This is technically not a _dynamic_ import. Consider Readme update.
See original GitHub issueNot to squabble over semantics, but a conversion from import()
to require.ensure()
is really not a dynamic import statement through webpack.
I’ve already started to see people saying that its possible to perform dynamic imports when that really is 0% supported by webpack (since it is only accomplished through static analysis). Since you folks are pretty well regarded in the OSS technology you publish, I just want to ensure that our webpack user base doesn’t have misguided expectations about what is possible.
With that in mind, would you consider renaming this module to be whatwg-import-webpack
instead of dynamic-import-webpack
?
Thanks for providing this awesome workaround to the API. You can track our github issue for implementing the native webpack support for import()
as we may add additional require.ensure features. (https://github.com/webpack/webpack/issues/3098). (It will however, still be statically analyzed).
Actually as I’ve been writing this I also noticed that @domenic called the proposal [dynamic-loader]
so that is fair that you would call it there.
I would be happy to PR the README to state that this doesn’t really perform truly dynamic imports, since webpack doesn’t support this.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Awesome awesome I’ll get a PR in!!
I totally agree as you could see my digression in the initial comment. My point is if we can any way make clear that using this for webpack doesnt result into a truly dynamic module load, then let’s do so. Less confusion => better dev exp