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

Babel does not compile sources after upgrade of babel-preset-react-app #3

Closed
kirill-konshin opened this issue Jun 22, 2017 · 9 comments
Labels

Comments

@kirill-konshin
Copy link
Owner

As stated in #2 (comment) Babel stopped compiling after upgrade of babel-preset-react-app.

Potentially related to facebook/create-react-app#2524.

kirill-konshin added a commit that referenced this issue Jun 22, 2017
Added ES2015 preset
@kirill-konshin
Copy link
Owner Author

@diligiant please try the latest master.

@diligiant
Copy link

@kirill-konshin I tested both 0.2.0 and your patch retrofitted to 0.3.0 (I had to tweak things a little bit as ModuleScopePlugin prevents from referencing ../../../wrapper) and it works fine. Thank you.

I don't know yet if the "es2015" side-effect on the react-project itself is harmless. I'll watch out.

@diligiant
Copy link

As we're using css-modules, we will probably need to inject options into babel-register (I'll submit a pull request). Giving it a try,

require('babel-register')({
        presets: [ 
            "es2015",
            "react-app"
        ]
    });

removes the need to change the cra project presets.

@kirill-konshin
Copy link
Owner Author

Babel register takes that from .babelrc or babel section of package.json, there's no need to call it explicitly. I will update the 0.3.0 branch today.

@diligiant
Copy link

Going further, babel requirements for cra and babel for server-cra are « opposite » so it's gonna take a lot more than just using your script (which works great btw). I see why cra team doesn't want to be involved in this right now ;)

@kirill-konshin
Copy link
Owner Author

I hope at some point they will at least merge my PR about the docs :)

I can't talk on their behalf but it seems they stay away from everything non-standard: CSS modules, preprocessors, annotations, so on and so on. They want to keep CRA as small as possible and deliver as much as they can at the same time.

@diligiant
Copy link

And that's good if you ask me. Having ejected, I maintain vanilla ejected cra so I can diff and apply to our stuff.

kirill-konshin added a commit that referenced this issue Jun 23, 2017
@kirill-konshin
Copy link
Owner Author

Released 0.2.1.

0.3.0 branch will be updated today, and probably will be released next week (w/o async route support though, need to investigate it more).

@kirill-konshin
Copy link
Owner Author

0.3.0 was rebased.

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

No branches or pull requests

2 participants