What happens is that you have not configured the UnCSS options in your brunch-config.js
file.
The reason why it works with brunch build
is that UnCSS is not really running, it only runs when you do an optimized build . The script used by Travis is, as I see in the log , "dist"
and that has been defined as : "dist": "del public && npm test && brunch build -p"
. Note that in that script you are passing the flag -p
at the end, which indicates that you must run the build production or optimized.
To solve the problem, add the UnCSS section within plugins
to your brunch settings, for example:
// Estos son valores de ejemplo, tienes que configurarlo según la estructura de tu proyecto
plugins: {
// ...
uncss: {
options: {
csspath: '../styles',
htmlroot: 'build'
},
files: ['index.html', 'about.html']
}
}