The dist main js file is 6MB+ and 2.x MB+ with nginx gzip enabled.
I checked with webpack-bundle-analyzer, components like pdfmake takes 30-40% size from the dist js.
In my case, I want to let users view the /view page anonymously, but if they need also load editor related code, that's a waste of band width and the loading is slow.
Describe the solution you'd like
Build codes into different files and load editor related code only if necessary.
Describe the feature
The dist main js file is 6MB+ and 2.x MB+ with nginx gzip enabled.
I checked with webpack-bundle-analyzer, components like pdfmake takes 30-40% size from the dist js.
In my case, I want to let users view the /view page anonymously, but if they need also load editor related code, that's a waste of band width and the loading is slow.
Describe the solution you'd like
Build codes into different files and load editor related code only if necessary.
Additional context
ng build --configuration=production
default angular.json
namedChunks=true and vendorChunk=true