Giter Site home page Giter Site logo

tree-shaking-comparison's Introduction

Tree Shaking Comparison

This project compares various bundlers and minifiers, particularly if using the D3 monorepo.

At present, it outputs Test 3 at the following sizes:

-rw-r--r--  1 aendrew  241K 21 Dec 12:09 jspm-bundle.min.js
-rw-r--r--  1 aendrew   96K 21 Dec 12:09 rollup-bundle.min.js
-rw-r--r--  1 aendrew  169K 21 Dec 12:09 webpack-bundle.min.js
-rw-r--r--  1 aendrew  236K 13 Jun 16:43 browserify-bundle.min.js

Using JSPM 0.17.0-beta.32, Rollup 0.36.4 and Webpack 2.1.0-beta.28. I also include Browserify 14.4.0 to provide a non-tree-shaking example.

At this point, I feel like I can say Rollup sufficiently optimizes the D3 monorepo to make it usable in production, and Webpack is close (I'd be curious to compare results from real-world projects; it's possible this lead would narrow if more of D3 was included.).

JSPM is hilarious, it uses Rollup internally yet still produces bundles over twice the size of Rollup's output.

## Installation:

  1. npm install -g jspm
  2. npm install
  3. npm run build
  4. ls -alh *-bundle.min.js

tree-shaking-comparison's People

Stargazers

Vincent Ogloblinsky avatar

Watchers

James Cloos avatar  avatar

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.