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

Add @babel/plugin-proposal-dynamic-import to @babel/preset-env #10109

Conversation

@nicolo-ribaudo
Copy link
Member

commented Jun 18, 2019

Q                       A
Fixed Issues? Closes babel/babel-loader#515, closes #9057 (by @thiagoarrais), ref babel/babel-loader#714
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

Follow up to #9552: that PR cretes the new plugin; this PR adds it to @babel/preset-env.

I'm really thankful that @loganfsmyth added the supportsDynamicImport flag to babel-loader and rollup-plugin-babel a long time ago 🙂

cc @Andarist Is this ok for rollup-plugin-babel?

@nicolo-ribaudo nicolo-ribaudo changed the title Dynamic import preset env Add @babel/plugin-proposal-dynamic-import to @babel/preset-env Jun 18, 2019
@babel-bot

This comment has been minimized.

Copy link
Collaborator

commented Jun 18, 2019

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

@babel-bot

This comment has been minimized.

Copy link
Collaborator

commented Jun 18, 2019

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

@Andarist

This comment has been minimized.

Copy link
Member

commented Jun 19, 2019

Well - I guess it’s hard to tell if this can break somebody’s expectations, considering in how many ways babel configs may be written. But I wouldn’t stop this because of that because i think possibility of breakage is low.

@nicolo-ribaudo

This comment has been minimized.

Copy link
Member Author

commented Jun 19, 2019

I think that this could only break only if someone disables the modules transform plugin using excludes instead of modules: false (I don't know if it is actually possible?)

@hzoo
hzoo approved these changes Jun 25, 2019
@nicolo-ribaudo nicolo-ribaudo merged commit b12fc5f into babel:feature-7.5.0/dynamic-import Jun 30, 2019
5 checks passed
5 checks passed
babel/repl REPL preview is available
Details
buildsize No significant change
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 87.5% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@nicolo-ribaudo nicolo-ribaudo deleted the nicolo-ribaudo:dynamic-import-preset-env branch Jun 30, 2019
@nicolo-ribaudo

This comment has been minimized.

Copy link
Member Author

commented Jun 30, 2019

Merged as ef3f555

nicolo-ribaudo added a commit that referenced this pull request Jun 30, 2019
@klimashkin

This comment has been minimized.

Copy link

commented Jul 30, 2019

Why do we show Dynamic import can only be supported when transforming ES modules to AMD, CommonJS or SystemJS. Only the parser plugin will be enabled warning in case of umd target even if there is no import() in the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.