yarn add --dev rollup-plugin-uglify@^3.0.0 broccoli-clean-css@^2.0.1
This will install the Rollup Uglify plugin. It is also possible to use the
broccoli-uglify-sourcemap Broccoli plugin,
and Rollup seems to work just fine with that plugin, however it makes more sense to use the supported Rollup plugin
rather than the Broccoli one. We're also installing the
broccoli-clean-css plugin that will compress our CSS.
Now update your
So what we're doing here is 2 things.
- Moving the Rollup plugins into a variable, so we can append the
uglify()plugin only for production
- Changing the
letso we can overwrite it for production, passing it into
That's it, now try building your prod application:
Completed Branch: 12-minify