Published JS File Sizes and Pre Rendering Speed #1168

Closed
opened 2025-08-09 17:19:07 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @NeilIrvingMacc on 12/20/2016

Hi Guys

I have been trying to make my website to load quicker on the initial load where user visits for the first time, I have got this to between 4-9 seconds where 9 seconds is on slow smartphones. After that other routes load in under a second and if I revisit the website it loads in under 2 seconds. I have even put a loading message up that changes every 2 seconds!

I messed with the webpack.config.vendor file as shown below and got vendor.js down to 800k and main-client.js down to 300k on a prod build

Just wondering why it still takes a while to load as I only have 12 routes and 9 of them are lazy loaded and I am using caching and compression on the server.

Is there anything else I can do or do I have to wait for WebPack v2 for tree shaking and AOT?

Thanks

Neil

vendor: [
//'@angular/common',
//'@angular/compiler',
//'@angular/core',
//'@angular/http',
//'@angular/platform-browser',
//'@angular/platform-browser-dynamic',
//'@angular/router',
//'@angular/platform-server',
'angular2-universal',
'angular2-universal-polyfills',
'bootstrap',
'bootstrap/dist/css/bootstrap.css',
//'es6-shim',
//'es6-promise',
'jquery',
//'zone.js',
'es6-promise-loader'
]

*Originally created by @NeilIrvingMacc on 12/20/2016* Hi Guys I have been trying to make my website to load quicker on the initial load where user visits for the first time, I have got this to between 4-9 seconds where 9 seconds is on slow smartphones. After that other routes load in under a second and if I revisit the website it loads in under 2 seconds. I have even put a loading message up that changes every 2 seconds! I messed with the webpack.config.vendor file as shown below and got vendor.js down to 800k and main-client.js down to 300k on a prod build Just wondering why it still takes a while to load as I only have 12 routes and 9 of them are lazy loaded and I am using caching and compression on the server. Is there anything else I can do or do I have to wait for WebPack v2 for tree shaking and AOT? Thanks Neil vendor: [ //'@angular/common', //'@angular/compiler', //'@angular/core', //'@angular/http', //'@angular/platform-browser', //'@angular/platform-browser-dynamic', //'@angular/router', //'@angular/platform-server', 'angular2-universal', 'angular2-universal-polyfills', 'bootstrap', 'bootstrap/dist/css/bootstrap.css', //'es6-shim', //'es6-promise', 'jquery', //'zone.js', 'es6-promise-loader' ]
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1168
No description provided.