Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Yarn build client size 1.2 MB #36

Closed
1 of 2 tasks
ghost opened this issue Jul 22, 2017 · 8 comments
Closed
1 of 2 tasks

Yarn build client size 1.2 MB #36

ghost opened this issue Jul 22, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 22, 2017

I'm submitting a ...

  • bug report
  • feature request

Feature Request:

Any idea how to bring this down? Is it just semantics and iconsapple-touch-startup-image-1536x2008.png?

@ghost ghost closed this as completed Jul 22, 2017
@Metnew
Copy link
Owner

Metnew commented Jul 22, 2017

Hi @TheDolo, icons aren't included in bundle size. You can run ANALYZE_BUNDLE=true APP_LANGUAGE=en npm run build for more info about bundle. Did you mean client + vendor size = 1.2mb?

@ghost
Copy link
Author

ghost commented Jul 22, 2017

I appreciate the suggestions for Webpack! That's one of my weak areas at the moment, but not for long :D

Oh my, BundleAnalyzerPlugin is fantastic. Make this part of the docs!! (OH, it is already!) Yea, it's both. Thanks!

Edit: momentJS is a pig! https://stackoverflow.com/questions/25384360/how-to-prevent-moment-js-from-loading-locales-with-webpack

@Metnew
Copy link
Owner

Metnew commented Jul 22, 2017

Hmm, but there is no momentJS in the starter... But yes, I agree, moment.js is a pig :)

@ghost
Copy link
Author

ghost commented Jul 22, 2017

Oh yea, that was on me! I added some other things and saw it reach 2MB, panic'd, started from scratch again and saw a 1.2MB default build, panic'd again then realized gzip is amazing, learned some more webpack, and now I see the light!

I also did this:
base.plugins.push(new BundleAnalyzerPlugin({analyzerMode: 'static'}))

Which got rid of the 8088 server and did .html reports! For some reason the analyzer server did not exit with ctrl+c. It's a github bug I think!

@Metnew
Copy link
Owner

Metnew commented Jul 23, 2017

Hm, strange, but why it's a github bug?

@ghost
Copy link
Author

ghost commented Jul 23, 2017

@Metnew
Copy link
Owner

Metnew commented Jul 23, 2017

Do you use BundleAnalyzer in dev move?
As I understood it crashes when --watch is on

@ghost
Copy link
Author

ghost commented Jul 23, 2017

Naw, only needed in production!

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant