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.

.babelrc location not configurable

See original GitHub issue

Is it true that the babelrc location can not be specified in the loader options? (I guess so because of delete options.babelrc; in index.js). Why is that the case?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
lijunlecommented, May 2, 2016

Yeah, it looks like it searches for it in the process.cwd() and every directory above that point for the .babelrc file.

This logic is WRONG. It should search starting from the directory of the file being transpiled instead of process.cwd(),

Babelrc document:

Babel will look for a .babelrc in the current directory of the file being transpiled. If one does not exist, it will travel up the directory tree until it finds either a .babelrc, or a package.json with a “babel”: {} hash within.

0reactions
daniele-orlandocommented, Mar 28, 2017

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Config Files - Babel.js
Project-wide configuration​​ x, Babel has a concept of a "root" directory, which defaults to the current working directory. For project-wide configuration, Babel ......
Read more >
Where is the location of .babelrc file? - Stack Overflow
The .babelrc file is your local configuration for your code in your project. Generally you would put it ...
Read more >
How to Configure Babel For Your Monorepo
In this post join me as I add Babel configuration to a monorepo, making sure that ... the code examples are not consistent...
Read more >
Configuring Babel 7 - YouTube
How Babel 7 configuration works.Repo: https://github.com/kentcdodds/ babel -config-exampleDocs: ...
Read more >
@babel/eslint-parser - npm
All location info such as line numbers, columns is also retained so you ... If no configuration file is found, @babel/eslint-parser will not ......
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