dojo / cli-build-webpack

🚀 **DEPRECATED** Dojo 2 - cli command for building applications
http://dojo.io
Other
4 stars 19 forks source link

Optimize CSS output for dist builds #123

Closed tomdye closed 7 years ago

tomdye commented 7 years ago

Enhancement

We currently do not apply any CSS optimization to our build output so we have some duplicated classes (due to css-module composition) and unused variable blocks as well as whitespace and non-shorthand style definitions. Adding the optimize-css-assets-webpack-plugin webpack plugin for dist builds will achieve this for us.

Example code

...includeWhen(!args.watch && !args.withTests, (args) => {
   return [new OptimizeCssAssetsPlugin()( options )];
}),