npx makes aurelia
- Choose
Default ESNext Aurelia 2 App
- Run
npm run build
Gets you 1 bundle file that has a 200kb
file size.
Now, installing @aurelia/router
and registering the RouterConfiguration
then rebuilding gets you 1 bundle file that has a size of about 320kb
. This also spits out a webpack warning:
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
This is just the base app, with no other dependencies installed and no additional code written.
Looking at bundlephobia, we can see that the package is tree-shakeable.
Adding "sideEffects": false
to the config and rebuilding doesn’t really decease the bundle size.
This is not really a big problem for me, but I am curious how you folks approach this? Any recommendations to decrease the bundle size?