Giter Site home page Giter Site logo

Yarn build client size 1.2 MB about suicrux HOT 8 CLOSED

metnew avatar metnew commented on May 2, 2024
Yarn build client size 1.2 MB

from suicrux.

Comments (8)

 avatar commented on May 2, 2024 1

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

from suicrux.

Metnew avatar Metnew commented on May 2, 2024

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?

from suicrux.

Metnew avatar Metnew commented on May 2, 2024

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

from suicrux.

 avatar commented on May 2, 2024

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!

from suicrux.

Metnew avatar Metnew commented on May 2, 2024

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

from suicrux.

 avatar commented on May 2, 2024

webpack-contrib/webpack-bundle-analyzer#37 I think!
and coryhouse/react-slingshot#301

from suicrux.

Metnew avatar Metnew commented on May 2, 2024

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

from suicrux.

 avatar commented on May 2, 2024

Naw, only needed in production!

from suicrux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.