Webpack compiling unreferenced files

We’ve had a large Aurelia app for a few years now. We started with Webpack 3 and have upgraded along the way to Webpack 5. In the beginning, if I ran the build in watch mode and added a new typescript file, or updated one that wasn’t referenced anywhere, then webpack wouldn’t compile it. However, somewhere along the way, this stopped happening. If we add a new typescript file now, or update one that’s not referenced, then it gets bundled up immediately.

This doesn’t seem like a big deal, however, this app has gotten very large and we are beginning to break it apart into multiple smaller builds based on user personas, etc. However, every build we make is still the exact same size, even though there are different app entrys.

Just curious if anyone else is/has experienced anything similar. Not sure if this started happening because of a change to webpack, or maybe the aurelia PAL or webpack-loader. Or if I’m just crazy…

1 Like

Everything you always wanted to know about aurelia-webpack plugin

Most probably somewhere in configuration of it there is includeAll: false that is beggin’ to be set…