Skip to content

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

Merged
nicolo-ribaudo merged 2 commits intobabel:feature-7.5.0/dynamic-importfrom
nicolo-ribaudo:dynamic-import-preset-env
Jun 30, 2019
Merged

Add @babel/plugin-proposal-dynamic-import to @babel/preset-env#10109
nicolo-ribaudo merged 2 commits intobabel:feature-7.5.0/dynamic-importfrom
nicolo-ribaudo:dynamic-import-preset-env

Conversation

@nicolo-ribaudo
Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo 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
Copy link
Copy Markdown
Collaborator

babel-bot commented Jun 18, 2019

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

@babel-bot
Copy link
Copy Markdown
Collaborator

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

@nicolo-ribaudo nicolo-ribaudo added pkg: preset-env PR: New Feature 🚀 A type of pull request used for our changelog categories Spec: Dynamic Import labels Jun 18, 2019
@nicolo-ribaudo nicolo-ribaudo added this to the v7.5.0 milestone Jun 18, 2019
@Andarist
Copy link
Copy Markdown
Member

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
Copy link
Copy Markdown
Member Author

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?)

@nicolo-ribaudo nicolo-ribaudo added the PR: Needs Review A pull request awaiting more approvals label Jun 20, 2019
@nicolo-ribaudo nicolo-ribaudo added PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release and removed PR: Needs Review A pull request awaiting more approvals labels Jun 27, 2019
@nicolo-ribaudo nicolo-ribaudo merged commit b12fc5f into babel:feature-7.5.0/dynamic-import Jun 30, 2019
@nicolo-ribaudo nicolo-ribaudo deleted the dynamic-import-preset-env branch June 30, 2019 11:50
@nicolo-ribaudo
Copy link
Copy Markdown
Member Author

Merged as ef3f555

@klimashkin
Copy link
Copy Markdown

klimashkin 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?

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 31, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 31, 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 pkg: preset-env PR: New Feature 🚀 A type of pull request used for our changelog categories PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release Spec: Dynamic Import

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants