-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix: make babel and webpack safer and faster #305
Conversation
safari10: true | ||
}, | ||
output: { | ||
ecma: 5, |
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.
Does this mean it is outputting ecma5 code?
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.
No this build outputs according to our default or repo browserlist support config !!
This setting means that any transformation applied by terser needs to be at least es5 compatible. Makes sense ? ES6+ code will not be converted to ES5 by terser but any change in the code made by terser needs to be es5 compatible.
filename: `${pkg.name}.js`, | ||
sourceMapFilename: `${pkg.name}.js.map` | ||
filename: 'index.js', | ||
sourceMapFilename: 'index.js.map' |
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.
I think the package name is a good default, but we should make this configurable to resolve #276 and allow JS IPFS to keep index.js
.
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.
can we tackle this in another PR ? this keep the current behaviour and makes this PR easier to integrate. I need this for the bundle size PRs
This PR makes experimental babel/webpack config safer, faster and more compatible with the default one and bundle smaller.