-
-
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
Specify sourceType #6279
base: main
Are you sure you want to change the base?
Specify sourceType #6279
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put this in the Babel plugin instead, please?
Not sure whether there's a better place to nest this (e.g. options on a specific preset), so I put it in the main options for the preset. Feel free to move it if this isn't ideal! |
Any thoughts on this @Timer? |
I'm wondering if this could cause regressions based on what I read in their docs: https://babeljs.io/docs/en/options#sourcetype. Specifically:
|
Anyone know why the travis build fails? I'm having the same problem. It's a very confusing bug because it doesn't say what's wrong with the code, it just says In my case I had used array destructuring assignment like this: |
@Timer any thoughts on this? this still seems like a significant bug, I'm not sure if there's a better approach than forcing the |
Any progress on this? Happy to help out with some of the grunt work if it helps! I recently upgraded |
Is anyone on this ? |
@yassine-be Though not ideal, you can work around this issue by replacing any object spread operators with |
Is anyone on this ? I'd love to have this fixed. |
Yeah, this is still a problem. Any thoughts, @Timer? |
Just throwing my hat in on this one, hoping it's not too far out. |
Resolves #6163, transpile a mixture of CJS scripts and ES modules in
src/
by treating only files withimport
orexport
statements as an ES module.