Git Product home page Git Product logo

Comments (1)

qdouble avatar qdouble commented on July 20, 2024

All builds target es5 unless they will be again processed by some other program...sometimes you may see a build targeting es6 or es2015 so they can be processed by something else (i.e. rollup). These setting are not necessary when using webpack (even setting the lib to es5 instead of es6 is mitigated by using @core-js types, as the lib setting only effects the polyfills applied by typescript).

Having one bundle is the main thing that enables Webpack to do it's treeshaking (instead of separate vendor bundles) from my understanding. I compared this starter using rollup and final size was close to the same when including polyfills and everything else (maybe 10-20KB gzipped difference). If you add compress:true to the the UglifyJsPlugin here: https://github.com/qdouble/angular2webpack2-starter/blob/master/webpack.config.ts#L122, although it won't change the output size, you will see it log the unused functions and code that it is dropping, which I assume is the treeshaking that is silently occurring.

from angular-webpack-starter.

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.