Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Conversation

@privatenumber
Copy link
Member

@privatenumber privatenumber commented May 17, 2022

Problem

Dynamically importing an ESM .js file resulting in getting wrapped in {"default": ... }.

Importing the following would look like this:

export default 1234
{"default":{"default":1234}}

Changes

  • New core-utils transforms dynamic imports to interop with transformed modules. Although this is a feature, it's also a breaking change.

@privatenumber privatenumber changed the title feat: dynamic import to read __esModule feat: dynamic import to interop with modules using __esModule May 17, 2022
@privatenumber privatenumber marked this pull request as ready for review May 17, 2022 15:37
@privatenumber privatenumber merged commit 4b7422b into develop May 17, 2022
@privatenumber privatenumber deleted the transform-dynamic-import branch May 17, 2022 15:52
@privatenumber
Copy link
Member Author

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants