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

Make 'useESModules' only toggle CJS vs ESM helpers when importing file is ESM. #8518

Merged
merged 1 commit into from
Aug 23, 2018

Conversation

loganfsmyth
Copy link
Member

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change? Y
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

Noticed this as a potential issue. If a file is a CJS file where we're just going to require the helper, we definitely don't want that helper to be one of the ESM helpers, since it's not at all clear that it will be possible to require an ESM file in the long run, and that could promote a bad pattern.

This is technically breaking, but most people don't even know useESModules is a thing, and those that do are almost certainly already disabling the CJS transform.

@loganfsmyth loganfsmyth added the PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release label Aug 23, 2018
@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/8895/

@loganfsmyth loganfsmyth merged commit 023044c into babel:master Aug 23, 2018
@loganfsmyth loganfsmyth deleted the runtime-cjs-force branch August 23, 2018 22:09
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants