-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Handling async chunks from splitChunks
?
#25
Comments
@leebenson I looked into this a long time ago (Webpack v1) and from what I can remember, it wasn't possible/feasible to get a name for chunks loaded with Assuming I can get the async chunk URLs into the manifest, how would you use them? Maybe there is a valid reason I can't think of at the moment. |
@leebenson After looking into this a bit, I've found that you can opt-in to having your async chunks included in the Example: import(/* webpackChunkName: "[request]" */ './some-file.js'); |
I saw that it goes to the root of the manifest, is it possible to include it to the entrypoint it belongs? |
+1 for associating the async chunks with their entrypoints somehow. I'd like to do something similar to GoogleChromeLabs/preload-webpack-plugin in my application, but this plugin doesn't currently tell me which assets should be preloaded/prefetched for a given entrypoint. |
Have you resolve this problem? @leebenson |
https://github.com/danethurber/webpack-manifest-plugin - this plugin seems to do it pretty good |
For my specific use-case (preloading React components in async chunks), the @loadable library solved the problem (specifically the SSR integration). |
- Minimum webpack version is now 4.40.0 - Updated dependencies - fixes #96 - Updated tests - Added `enabled` option - Added `entrypointsUseAssets` option - fixes #66 - Brought back the `contextRelativeKeys` option - fixes $44 - Use lock files when using `writeToDisk` - fixes #89 - Use lock files when emitting the manifest - fixes #64 - Get all compilation assets with `getAssets()` - fixes #56 #49 #25 - Swapped the key/value in `assetNames` - fixes #56 - Updated merge behavior for entrypoints - fixes #48
- Minimum webpack version is now 4.40.0 - Updated dependencies - fixes #96 - Updated tests - Added `enabled` option - Added `entrypointsUseAssets` option - fixes #66 - Brought back the `contextRelativeKeys` option - fixes #44 - Use lock files when using `writeToDisk` - fixes #89 - Use lock files when emitting the manifest - fixes #64 - Get all compilation assets with `getAssets()` - fixes #56 #49 #25 - Swapped the key/value in `assetNames` - fixes #56 - Updated merge behavior for entrypoints - fixes #48
- Minimum webpack version is now 4.40.0 - Updated dependencies - fixes #96 - Updated tests - Added `enabled` option - Added `entrypointsUseAssets` option - fixes #66 - Brought back the `contextRelativeKeys` option - fixes #44 - Use lock files when using `writeToDisk` - fixes #89 - Use lock files when emitting the manifest - fixes #64 - Get all compilation assets with `getAssets()` - fixes #56 #49 #25 - Swapped the key/value in `assetNames` - fixes #56 - Updated merge behavior for entrypoints - fixes #48
Using Webpack 4, this plugin works perfectly with sync chunks, but doesn't handle async chunks generated by
import()
statements.A dump of my
manifest.json
:But on the filesystem:
The text was updated successfully, but these errors were encountered: