New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce JS bundle size and add webpack bundle analyzer #86
base: develop
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-env
removes the need for manual import of polyfills and will pick the necessary things out ofbabel-polyfill
.webpack-bundle-analyzer
generates abuild/assets/js/webpack-report.html
showing an overview of every bundle. This is tremendously helpful when analyzing bundle size.handlebars.runtime
instead ofhandlebars
reduces the main bundle size by about a trillion KBelement-dataset
does 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:
useBuiltIns
option some more