-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Use standard .*rc files #410
Comments
The same goes for |
I agree, that seems like expectable behaviour to me as well. |
It's not trivial to implement in a way that won't break in the future. Do you have implementation suggestions for this? |
(If we do this we also can't guarantee that ejecting is safe. For example if there is a broken babelrc in a parent folder, it would not be taken into account after eject, but with your suggestion, it could start throwing). |
I ran into an issue trying to use the Setting the babel It would be even better if the babel And you could add your own config on top of that. |
If you can figure out a way to make this project use |
I'm not across the issues caused by using |
The MobX docs tell me I must "use the transform plugin transform-decorators-legacy and make sure it is first in the plugins list", in order for the decorators to work. How can I do that when there is no .babelrc? Is there some workaround? |
You can’t use decorators with this setup currently. However you don’t need decorators for MobX. I wish its docs put more emphasis on this. cc @mweststrate, this confusion came up 5 times, maybe worth making it more apparent that they’re not necessary? |
@gaearon yep, had on my todo list where to investigate where the confusion comes from, to make it more clear that is optional. @hillscottc where would you have expected that for example? The readme currently starts with an example how to do things both with and without decorators. Was that clear? For people stumbling into this in the future, here is a small create-react-app based repo with MobX, without decorators: https://github.com/mobxjs/create-react-app-mobx Edit see also: http://mobxjs.github.io/mobx/best/decorators.html |
Thanks for taking the time to do that! |
@gaearon is the main issue with using |
The main issue is that nobody did this :-). If you submit a PR we can start looking at individual problems. |
(I'm not talking about supporting decorators or merging configs which is unrelated to this thread. I meant outputting RC files on eject.) |
I have an almost working hacked together script that does it, in a couple of days I should be able to open a decent PR. It tries to merge the (optionally) existing
Ideas? |
I think we won't support any attempts to merge configs. It is just impossible to do safely because of how Babel is implemented (some plugins can only be used together in a specific order). |
This is implemented in #705 and will be released in 0.5.0. |
0.5.0 is out with this. |
Suggested implementation for custom babel configuration #1357 |
After ejecting it is not immediately clear how to add, for example, new scripts that use
babel-cli
.The configuration I'm used to is in a
.babelrc
file which is loaded automatically by babel, right now I'm not sure how to replicate this standard behaviour withbabel.dev.js
.The text was updated successfully, but these errors were encountered: