question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Babel `loose` setting

See original GitHub 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 https://github.com/babel/babel/issues/11622 tracked it to create-react-app setting loose flag on class properties transform, while I’ve included shippedProposals into babel presets in my setup. I’ve never set anything to loose or “firm” explicitly.

The work-around, for me, was to add loose to preset flags.

I guess the question is:

  • should this be documented?
  • if someone tweaks babel settings, are they on their own and should eject?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:9
  • Comments:7

github_iconTop GitHub Comments

2reactions
agriffiscommented, May 27, 2020

In the meantime, if anybody has a rescripts formula for working around this, that would be wonderful

0reactions
stale[bot]commented, Jul 3, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel/preset-env
For more information on setting options for a preset, refer to the preset ... Enable "loose" transformations for any plugins in this preset...
Read more >
Babel plugins: 'loose' mode caveats
What does loose mode mean? Many babel plugins have two modes: Normal mode: closely follows the ECMAScript 6 standard. Loose mode: produces ...
Read more >
Latest Nuxt v2.15.7 install with babel "loose" option warnings
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property- ...
Read more >
Babel - Storybook
Babel. Storybook's webpack config by default sets up Babel for ES6 transpiling. It has three different modes: CRA - the mode for Create...
Read more >
babel-preset-es2015-loose | Yarn - Package Manager
Babel preset for all es2015 plugins, with loose mode enabled where available. readme. babel-preset-es2015-loose. Deprecation warning.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found