Skip to content

Instantly share code, notes, and snippets.

@y0za
Last active January 11, 2018 11:34
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y0za/7b5ac24723c3eae7580d1ef0f25dc550 to your computer and use it in GitHub Desktop.
Save y0za/7b5ac24723c3eae7580d1ef0f25dc550 to your computer and use it in GitHub Desktop.
preact redux build size

.babelrc

{
  "presets": ["es2015", "stage-0"],
  "plugins": [
    ["transform-react-jsx", { "pragma": "h" }],
    "transform-runtime"
  ]
}

preact + redux

$ NODE_ENV=production $(npm bin)/webpack --json | webpack-bundle-size-analyzer
core-js: 36.57 KB (29.7%)
preact: 24.46 KB (19.9%)
redux: 22.02 KB (17.9%)
preact-redux: 21.37 KB (17.4%)
babel-runtime: 4.33 KB (3.52%)
lodash: 3.5 KB (2.84%)
css-loader: 1.47 KB (1.20%)
symbol-observable: 451 B (0.358%)
<self>: 8.81 KB (7.16%)

preact + redux + redux-saga + axios

$ NODE_ENV=production $(npm bin)/webpack --json | webpack-bundle-size-analyzer
redux-saga: 55.52 KB (22.6%)
core-js: 37.96 KB (15.5%)
axios: 32.1 KB (13.1%)
preact: 24.46 KB (9.98%)
regenerator-runtime: 22.32 KB (9.10%)
redux: 22.02 KB (8.98%)
preact-redux: 21.37 KB (8.71%)
babel-runtime: 4.47 KB (1.82%)
process: 4.4 KB (1.80%)
lodash: 3.5 KB (1.43%)
css-loader: 1.47 KB (0.600%)
symbol-observable: 451 B (0.180%)
<self>: 15.15 KB (6.18%)

preact + redux + redux-saga + axios + redux-actions

$ NODE_ENV=production $(npm bin)/webpack --json | webpack-bundle-size-analyzer
lodash: 110.76 KB (30.3%)
redux-saga: 55.52 KB (15.2%)
core-js: 37.96 KB (10.4%)
axios: 32.1 KB (8.79%)
preact: 24.46 KB (6.70%)
regenerator-runtime: 22.32 KB (6.11%)
redux: 22.02 KB (6.03%)
preact-redux: 21.37 KB (5.85%)
redux-actions: 11.87 KB (3.25%)
babel-runtime: 4.47 KB (1.23%)
process: 4.4 KB (1.21%)
css-loader: 1.47 KB (0.403%)
symbol-observable: 451 B (0.121%)
reduce-reducers: 419 B (0.112%)
webpack: 251 B (0.0671%)
<self>: 15.22 KB (4.17%)

size

packages minify gzip
preact + redux 47KB 15KB
preact + redux + redux-saga + axios 93KB 29KB
preact + redux + redux-saga + axios + redux-actions 123KB 38KB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment