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

Use loose mode on Babel stage-0 plugins #146

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
modules: false
}
],
'@babel/preset-stage-0',
['@babel/preset-stage-0', {loose: true}],
Copy link
Contributor

@webOS101 webOS101 Sep 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's a good idea to go loose on all of the stage 0 presets. It's not recommended to use loose, though it will produce faster code... Can we be more targeted? It seems we only need loose class properties. See mobxjs/mobx#1352 regarding some babel 7 issues. Is Mobx support more important than keeping close to the standard?

Copy link
Member Author

@JayCanuck JayCanuck Sep 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the webpack 4 work we are specific and only target the class properties plugin (as presets are gone then). Unless we want larger scale changes in cli, we can take this change as a temporary fix until webpack 4 is merged, or wait until the webpack 4 pr goes in. Moreso upto you guys since it only affects mobx for us so far.

'@babel/preset-react'
],
plugins: [
Expand Down