[Webpack CLI] Enable/disable minification

Hello all, we’ve been working with Aurelia for a couple years now and have multiple projects using different technologies under the hood. Our oldest project is using RequireJS and the CLI, and aurelia.json provides a method to specify which environments have minification enabled. I can’t find out how to do this using webpack and the CLI. The settings from the RequireJS setup do not work and I haven’t found anything in the docs going over it.

Prod successfully minifies everything. Before gzip, prod is roughly 1.2mb in size for our app bundle and every other environment is around 4mb. It’s good that this is working, but it doesn’t make me feel good that I can’t seem to find out why it’s happening at all, especially when Aurelia should be environment-agnostic under the hood. It’s also important for us to squeeze out what performance we can on our staging environment so that we can get as accurate a representation as possible for its production performance.

With Webpack, you can specify the environment when running webpack from CLI, I think it works better and you can easily construct environment specifier. Another thing to do is to add webpack-bundle-analyzer to see what’s going on inside the bundle, it should help greatly