Skip to content

Make babelrc configurable#121

Merged
couto merged 1 commit intomasterfrom
unknown repository
Nov 4, 2015
Merged

Make babelrc configurable#121
couto merged 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Oct 22, 2015

This fixes #107

@thealjey
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

couto commented Nov 4, 2015

@thealjey lol someone should update the website 💃

@thealjey
Copy link
Copy Markdown

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