Skip to content
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

Merged
merged 2 commits into from
Dec 6, 2018
Merged

Conversation

hugomrdias
Copy link
Member

This PR makes experimental babel/webpack config safer, faster and more compatible with the default one and bundle smaller.

@ghost ghost assigned hugomrdias Dec 4, 2018
@ghost ghost added the status/in-progress In progress label Dec 4, 2018
safari10: true
},
output: {
ecma: 5,
Copy link
Member

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?

Copy link
Member Author

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'
Copy link
Member

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.

Copy link
Member Author

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

@hugomrdias hugomrdias merged commit e47ea98 into master Dec 6, 2018
@hugomrdias hugomrdias deleted the fix/babel branch December 6, 2018 18:15
@ghost ghost removed the status/in-progress In progress label Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants