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.

Is babelrc being ignored?

See original GitHub issue

Choose one: is this a ๐Ÿ› bug report or ๐Ÿ™‹ feature request?

This is possibly a bug.

๐ŸŽ› Configuration (.babelrc, package.json, cli command)

.babelrc

{
  "presets": ["env"]
}

.browserslistrc

last 1 Firefox versions

๐Ÿค” Expected Behavior

regeneratorRuntime shouldnโ€™t be used since Iโ€™m targeting only the most recent Firefox version, which natively supports async/await.

๐Ÿ˜ฏ Current Behavior

ReferenceError: regeneratorRuntime is not defined

๐Ÿ”ฆ Context

Using babel-polyfill works, but since Iโ€™m creating a Firefox extension targeting the most recent version of Firefox, I donโ€™t want to transform async/await.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

7reactions
jgrassinicommented, Jan 8, 2018

I encountered a similar problem. It looks like that Parcel (or Babel?) ignores .browserslistrc It should work when you add the query directly into .babelrc

{
    "presets": [
      [ "env", {
        "targets": {
          "browsers": "last 1 Firefox versions"
        }
      }]
    ]
  }

But why do you use Babel at all when you target a modern browser?

4reactions
jgrassinicommented, Jan 8, 2018

To disable Babel you remove the .babelrc file

Do you use the --no-cache option when you build the project? parcel build --no-cache ....

With the cache Parcel does not pick up configuration changes when the code did not change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

babelrc.js is being ignored ยท Issue #780 - GitHub
I'm submitting a bug report. Webpack Version: 4.29.6. Babel Core Version: 7.4.0. Babel Loader Version: 8.0.5.
Read more >
babelrc ignore field seems to be ignored - Stack Overflow
When I compile it with babel src --out-dir dist , the src folder is still compiled onto the dist folder. However, when I...
Read more >
Options - Babel.js
Options like "test" , "exclude" , and "ignore" require the filename for string/RegExp matching. .babelrc.json or .babelrc files are loaded relative to the...
Read more >
renewcommand being ignored when babel is loaded - TeX
User @daleif postet a working example to the comments. I'll just copy it here for better readibility: babel overwrites at begin document.
Read more >
Advanced Features: Customizing Babel Config - Next.js
To start, you only need to define a .babelrc file (or babel.config.js ) at the top of your app. If such a file...
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