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

Updates @babel/plugin-syntax-dynamic-import core-js module paths (core-js@3) #2037

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbottigliero
Copy link

  • Adds core-js@3 plugin path varients to documentation.

…e-js@3)

- Adds core-js@3 plugin path varients to documentation.
@netlify
Copy link

netlify bot commented May 24, 2019

Deploy preview for babel ready!

Built with commit 874b3aa

https://deploy-preview-2037--babel.netlify.com

@@ -44,8 +44,12 @@ Currently, `@babel/preset-env` is unaware that using `import()` with [Webpack re
// webpack config
const config = {
entry: [
// using core-js@2
"core-js/modules/es.promise",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already for core-js@3: core-js@2 uses es6. instead of es..

Also, those files exist in core-js@3: https://unpkg.com/[email protected]/modules/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was seeing module resolution errors with the (internal) modules/ based paths after swapping the configuration over to core-js@3 and found swapping to the /stable/ variants to be the solution.

Something else could certainly be the cause of the resolution error if the es. version is supported... sounds like this change shouldn't be necessary?

@zloirock
Copy link
Member

preset-env with core-js@3 should automatically inject Promise with dependencies on dynamic import.

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

Successfully merging this pull request may close these issues.

None yet

3 participants