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
[feature request] include dynamic import syntax plugin automatically #515
Comments
I can't think of a reason not to do this, since the current version only supports |
This wa a source of pain for me because I was using the Webpack version of the plugin vs the Babel version. I was pulling out my hair tying to get the webpackChunkName comment to work. Then there’s the @babel namespace that you should use for some modules because they’ve been moved. In general, I find it hard to find the right module sometimes because of similar names, clones, and name spacing. Of course that’s a whole topic on its own :) |
Just started a PR for this. Can someone please help me get it merged? |
Fixed by babel/babel#10109 |
I've written/talked about this before a few times, might as well make it an issue.
We shouldn't have to ask users to include the dynamic import plugin if webpack is supporting it and is a source of pain. Ideally it would work with preset-env where webpack is it's own target or something but this is already babel-loader so we know that a user is using webpack + babel together. We could just make it a dependency (or just use
parserOpts: { plugins: ['dynamicImport'] }
and no dependency necessary).So like at
babel-loader/src/index.js
Lines 128 to 129 in 1ca5c78
const defaultOptions = { + parserOpts: { plugins: ['dynamicImport'] },
Or we'd have to do append the plugin to the end of the
plugins
:The text was updated successfully, but these errors were encountered: