Reduce JS bundle size and add webpack bundle analyzer#86
Reduce JS bundle size and add webpack bundle analyzer#86
Conversation
|
It seems QUnit tests are failing all around… not only in this PR |
|
I implemented this branch in current project without issues so far. By the way: very handy (and scary up to a certain point) the stats view |
|
@orioltf, re QUnit: Netlify seems to be fine, is it possible that the tests run through in PhantomJS (during the build) and we're just screwing up the paths for the browser? |
|
I would say so. It seems test.js gets a 404 when loading slideshow module page.
|
|
@backflip How would you see using package.json to define the browserslist? https://github.com/ai/browserslist#environments |
| presets: [ | ||
| ['env', { | ||
| debug: util.env.dev, | ||
| useBuiltIns: 'entry', |
There was a problem hiding this comment.
Let's rather check usage: https://github.com/babel/babel/tree/master/experimental/babel-preset-env#usebuiltins-usage
There was a problem hiding this comment.
Note: Dependencies need to be updated accordingly:
"@babel/core": "^7.0.0-beta.34",
"@babel/polyfill": "^7.0.0-beta.34",
"@babel/preset-env": "^7.0.0-beta.34",
"babel-loader": "^8.0.0-beta.0",
|
Added to new implementation |
babel-preset-envremoves the need for manual import of polyfills and will pick the necessary things out ofbabel-polyfill.webpack-bundle-analyzergenerates abuild/assets/js/webpack-report.htmlshowing an overview of every bundle. This is tremendously helpful when analyzing bundle size.handlebars.runtimeinstead ofhandlebarsreduces the main bundle size by about a trillion KBelement-datasetdoes not do a lot with regards to bundle size, but I never understood what it was for and it doesn't seem to be missing when removed. :)Tested in IE >= 9 and Chrome
TODO:
useBuiltInsoption some more