Running ./bin/webpack --watch --progress results in minified CSS files in development with no errors.
Then I ran the command to bundle for production:
bundle exec rake assets:clean[9]; RAILS_ENV=production bundle exec rake assets:precompile
However, trying to compile for production does not work.
Expected Behavior
The expected behavior is for Webpacker to work with the plugin in both development and production.
How Do We Reproduce?
Please paste the results of npx webpack-cli info here, and mention other relevant information
Error message:
Invalid options object. Css Minimizer Plugin has been initialized using an options object that does not match the API schema.
- options has an unknown property 'sourceMap'. These properties are valid:
object { test?, include?, exclude?, minimizerOptions?, parallel?, warningsFilter?, minify? }
In order to get it to work I had to downgrade to "css-minimizer-webpack-plugin": "^1.3.0" but ideally I could use the latest version.
Hello,
I recently opened a new issue with the css minimizer webpack plugin but I was told that this is caused by webpacker and that I should open an issue here instead.
Here is the reply I received from cc-minimizer:
I'll paste my problem below:
Bug report
The plugin
css-minimizer-webpack-plugin
works in development but does not build for production.Using:
Actual Behavior
Webpack was set up like this:
Running
./bin/webpack --watch --progress
results in minified CSS files in development with no errors.Then I ran the command to bundle for production:
bundle exec rake assets:clean[9]; RAILS_ENV=production bundle exec rake assets:precompile
However, trying to compile for production does not work.
Expected Behavior
The expected behavior is for Webpacker to work with the plugin in both development and production.
How Do We Reproduce?
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationError message:
In order to get it to work I had to downgrade to
"css-minimizer-webpack-plugin": "^1.3.0"
but ideally I could use the latest version.TY!