libraryTarget umd & code splitting
See original GitHub issueWhen splitting code in webpack, the chunks are loaded with temporary script tags:
/******/ var head = document.getElementsByTagName('head')[0];
/******/ var script = document.createElement('script');
/******/ script.type = 'text/javascript';
/******/ script.charset = 'utf-8';
/******/ script.async = true;
/******/ script.timeout = 120000;
/******/ script.src = __webpack_require__.p + "" + ({}[chunkId]||chunkId) + "." + "<some_key>" + ".js";
When creating an umd library, the library might be loaded by another bundler again (webpack, jspm, etc.). In that case, the script tag loading isn’t nice. It would be better to keep the AMD (or System.import for webpack 2) in the chunks which will be interpreted by the other bundler. I didn’t find an option to enable this. Is it a missing feature? Or am I missing something and code splitting in umd libraries not possible?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:8 (4 by maintainers)
Top Results From Across the Web
libraryTarget UMD and code splitting · Issue #6818 - GitHub
When splitting code in webpack, the chunks are loaded with temporary script tags: ... libraryTarget UMD and code splitting #6818.
Read more >Webpack Code Splitting for your Library - Robin Wieruch
A walkthrough on how to use code splitting for your library to reduce your bundle size by giving multiple entry points to your...
Read more >Webpack 4: How to set up Code Splitting for a library ...
My Webpack is outputting the individual files, but it's not splitting out common code in a way that an app can consume the...
Read more >Output - webpack
However, when creating multiple bundles via more than one entry point, code splitting, or various plugins, you should use one of the following...
Read more >Understanding the Webpack Dynamics | by Param Singh
Development tools like Hot reloading, dev server; Code splitting and on ... Specifying the libraryTarget as umd which stands for Universal ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sokra I would need this feature too. Could you consider to reopen this?
@davidagraf @alexcastillo @monteraphael @LucaMele @sokra
I just created a new ticket, cause this was not reopenend, at #6818