Name: victory-line-experiments
Owner: Formidable
Description: Bundle size experiments
Created: 2017-04-02 16:55:32.0
Updated: 2017-04-02 16:57:29.0
Pushed: 2017-04-03 17:06:59.0
Homepage: null
Size: 33
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Various Webpack configuration hacking for an efficient, terse app bundle with
VictoryLine
from victory
.
Victory builds to ES6 es
which is pointed to in package.json:module
so we should get full tree-shaking benefits. But we don't until webpack@4.
Related other tickets:
We have two entry points that only differ in:
se-index.js
se the full index with all re-exported components.
rt { VictoryLine } from "victory";
and
ne-off-import.js
o straight off of the full path to the individual component.
rt VictoryLine from "victory-chart/es/components/victory-line/victory-line";
Here's current for webpack@3
:
st build
rn run build
-c dist/*
6629 dist/one-off-import.js
0275 dist/use-index.js
custom minification that's actually readable while still doing DCE
you can inspect `dist.main.js` to look for tree shaking (`unused` comments).
MO=true yarn run build
wc -c dist/*
0848 dist/one-off-import.js
7913 dist/use-index.js
There is a significant different in size for webpack@3
:
296 KB
460 KB