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

Make babelrc configurable #121

Merged
merged 1 commit into from Nov 4, 2015
Merged

Make babelrc configurable #121

merged 1 commit into from Nov 4, 2015

Conversation

ghost
Copy link

@ghost ghost commented Oct 22, 2015

This fixes #107

@thealjey
Copy link

thealjey commented Nov 4, 2015

this would've beed very useful if it wasn't for #1886 (see my comment at the bottom)

@Couto
Copy link
Member

Couto commented Nov 4, 2015

Deleting the option won't affect much since babel is not expecting any babelrc option itself: https://babeljs.io/docs/usage/options/

So I have to ask, are you trying to read options from babelrc or just trying to bust the internal cache ?

@Couto Couto merged commit 39403c3 into babel:master Nov 4, 2015
@Couto
Copy link
Member

Couto commented Nov 4, 2015

I've read the linked discussion.
As far as I can tell from the docs, there's no babelrc option, however it seems that nothing breaks by allowing the option pass, so might as well not forbid it.

It's currently in the master and develop branch, give it a try, I should make a release tomorrow

@Couto
Copy link
Member

Couto commented Nov 4, 2015

@thealjey lol someone should update the website 💃

@thealjey
Copy link

thealjey commented Nov 4, 2015

@Couto
the problem is that it is currently an on/off switch which tells babel whether to search for .babelrc or not
there's currently no way to specify a specific file to use

For example, ESLint has a --config flag (.eslintrc is just a convenient default), JSDoc has a --configure flag, scss-lint has a --config flag for specifying a configuration file to use.

This is basically the reason why to this day I was not able to use .babelrc on my project (but I really want to for obvious reasons).
For the API functions it's not that big a deal, because it's easy to pass a config object to them.
As to the CLI it's not as easy, and not possible in some cases.

I would also just love it if the configuration could be written in the YAML format (just a personal preference).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.babelrc location not configurable
2 participants