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
7.0.0-beta.46 regression: "Unexpected token" with TypeScript #7791
Comments
Hey @deepsweet! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
We changed the .babelrc/package.json#babel search to stop at package.json files. If you use a monorepo, you need to create a |
http://www.nooooooooooooooo.com/ What's the reason behind this huge change? |
I mean I do know the story regarding |
Ended up here looking for reasons for the same problem but with multirepo setup where npm packages contain raw es6 and @babel/register used for tests is explicitly told to transpile them. Adding babelrcRoots: true to the config for babelRegister call fixed the problem. @deepsweet you could try adding it to your @babel/register options in package.json |
unfortunately only |
FYI the PR was #7358. This is an issue we've been trying to look into since November; a PR was posted a while ago and we've reached out to many folks in the community for feedback. Didn't have any better suggestions and we agreed to go with this solution. You can read the description to get a idea of the changes. We've had to make the same changes for babel itself since it is also a monorepo, #7784. This wasn't a change we just randomly did. |
It's a bit confusing, but I almost figured it out – here I have another monorepo with |
Bug report.
Input Code
Babel/Babylon Configuration (.babelrc, package.json, cli command)
Expected Behavior
No errors.
Current Behavior
How to reproduce: clone https://github.com/deepsweet/start,
yarn
,yarn upgrade
,yarn start
Possible Solution
Works fine with
beta.44
.Context
Your Environment
The text was updated successfully, but these errors were encountered: