-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Babel loose
setting
#9068
Comments
In the meantime, if anybody has a rescripts formula for working around this, that would be wonderful |
For storybook, this is fixed in v6.0.0-beta.16 |
I'm using react-app-rewired and I've set up babel to pick up options from package.json: for (const rule of draft.module.rules) {
if (rule.oneOf) {
for (const one of rule.oneOf) {
// If it quacks like a duck, it must be Babel
if (one.options && one.options.presets) {
one.options.babelrc = true;
}
}
}
} (I'm not sure if that's necessary) After which I can set "babel": {
"plugins": ["babel-plugin-macros"],
"presets": [
["@babel/preset-env",
{
"loose": true,
"useBuiltIns": false,
"shippedProposals": true,
"debug": false
}]]}, Then again, if someone includes I'm planning to use config override to disable |
Good news (for me). When targeting only evergreen browsers, the
(tested by changing the file in node_modules + package.json) Thus, IMO, it's fine to recommend that users set |
Note that we'll fix the error on the Babel side (however, this discussion still has value on its own). |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
Having recently updated babel, I ran into the error:
'loose' mode configuration must be the same for both @babel/plugin-proposal-class-properties and @babel/plugin-proposal-private-methods
Good folks at babel/babel#11622 tracked it to
create-react-app
settingloose
flag on class properties transform, while I've includedshippedProposals
into babel presets in my setup. I've never set anything toloose
or "firm" explicitly.The work-around, for me, was to add
loose
to preset flags.I guess the question is:
The text was updated successfully, but these errors were encountered: