-
Notifications
You must be signed in to change notification settings - Fork 19
gulp build generates extremely large .js file of nearly 1mb file size? #97
Comments
Did you measured the dist version (to be sure). The dev version is giant cause of doc and debug mode. If yes, the only thing that we can do is to activate Tree Shaking but that's not that easy. |
Yes. I am talking ( and concerned) only about the main-*.js file in the dist directory. |
@RohitRane Do you have a huge number of code lines as well ? |
@micaelmbagira , @Swiip : not really.. I explored further. Even the default "Working landing page" built using your generator create a build file (main.js) of size : 1 Mb This is a snapshot of the steps I followed :
Out of the box I include by default Gulp 4, ESLint, Browsersync and Karma. ? Which JavaScript framework do you want? Angular 2 After generating an app this way. I did 'gulp build' and this is what I get on doing As you can see without any of my own person code itself we have build of 1 mb. Any further views that I add to the SPA will only further bloat the application.. And this I got on choosing : If I choose a TodoMVC app it gets even bigger. I thought Angular 2 was suppose to be sleaker and lighter than Angular 1. At this rate.. It take 7428 milliseconds to render this page with a throttling of : Hope this info helps. |
@micaelmbagira , @Swiip : Also note that the generate bundle main.js has the MIT license repeating 250 + times :
If you could limit the appearance of this license to once maybe you'll save a lot more space. |
Hi @RohitRane currently we have the source code and the vendors in the |
I think I've got similar issue, and when I look at dist/index.js I see no minification/uglification etc. Is that expected? |
Description
Fountain webapp angular 2 with webpack / system js generates very large main.js/index.js file.
I used in combination with angular/router.
Using such a large file in production even before adding any substantial views and functionality causes loading speed to drop.
Copy the content from
.yo-rc.json
:The text was updated successfully, but these errors were encountered: