Skip to content

fix: downgrade @babel/preset-env temporarily #3716

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

Merged
merged 1 commit into from
Mar 27, 2019

Conversation

haoqunjiang
Copy link
Member

seems there're still problems with it, e.g. when core-js 3 is hoisted as the root level dependency.

@haoqunjiang haoqunjiang merged commit f107623 into vuejs:dev Mar 27, 2019
@jacekkarczmarczyk
Copy link

@sodatea Can you describe the problem? I'm not sure if it doesn't affect my app or I just don't see it

@haoqunjiang
Copy link
Member Author

@jacekkarczmarczyk @babel/preset-env 7.4+ introduced an indirect dependency of core-js@3, in some cases, core-js@3 is incorrectly hoisted to node_modules root. Meanwhile, @babel/preset-env injects code like import "core-js/...", which expects core-js 2 directory structure, that will cause problem.

I'm not sure how it happened as I personally didn't encounter this problem, but I guess it may happen when you use transpileDependencies.

To ultimately solve this problem we may need to add core-js@2 as direct dependency to the generated projects.

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

Successfully merging this pull request may close these issues.

2 participants