sweijdt's avatar
Level 25

vuejs production file size

I think I'm doing something wrong. When I strip my bootstrap.js and app.js to the bare minimum.. it's still 70kb/80kb after running gulp --production. However on vuejs.org I read it should be more around 23kb. What did I miss?

https://vuejs.org/v2/guide/comparison.html#Size-and-Performance

0 likes
4 replies
ejdelmonico's avatar

If you have striped out jQuery, Bootstrap and loads from bootstrap.js, I think that is as small you can probably get given the type of app.

sweijdt's avatar
Level 25

I've stripped everything except for vuejs. However, it's still 70kb.

On vuejs.org it says the following:

Size wise, although Angular 2 with offline compilation and tree-shaking is able to get its size down considerably, a full-featured Vue 2.0 with compiler included (23kb) is still lighter than a tree-shaken bare-bone example of Angular 2 (50kb). 

It can't be 70kb. Where's the other 47kb coming from?

ejdelmonico's avatar

Try opening the file with Chrome Dev Tools and what all is in the file.

sweijdt's avatar
Level 25

Only vuejs. Could it be the gzip filesize? I guess, because here Evan You mentions the filesize without compiler:

The template-to-virtual-DOM compiler and the runtime can be separated, so you can pre-compile templates and ship your app with only the runtime, which is less than 12kb min+gzip (as a reference, React 15 is 44kb min+gzip).

Gzipped I get 30kb. So that's close. I'm just curious how to separate the compiler and what consequences are connect to that.

Thanks for the chrome dev tools idea. It brought me to the gzipped version.

Please or to participate in this conversation.