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

Compile dependencies with same configuration as CRA uses #6079

Closed
bbenejc opened this issue Dec 21, 2018 · 1 comment
Closed

Compile dependencies with same configuration as CRA uses #6079

bbenejc opened this issue Dec 21, 2018 · 1 comment

Comments

@bbenejc
Copy link

bbenejc commented Dec 21, 2018

Is this a bug report?

No

As stated in #3776 - CRA now transpiles all node_modules with babel-preset-env. Why does it not use the same plugins as well?

I created a module, which I use in multiple of my projects. And I get an error:
Support for the experimental syntax 'classProperties' isn't currently enabled

I have to build it manually with babel every time I make changes... It works, but I am wondering if it is possible to enable the plugins to be used for node_modules some way without ejecting.

@Timer
Copy link
Contributor

Timer commented Dec 21, 2018

Sorry, but you need to eject if you want to use unstable JavaScript features for your dependencies.
The best solution here is to build your module as if you were publishing to npm.

@Timer Timer closed this as completed Dec 21, 2018
@lock lock bot locked and limited conversation to collaborators Jan 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants