Feature - Export the manifest object from runtime chunk
See original GitHub issueFeature request
What is the expected behavior?
If the project generates a single runtime chunk file by option
optimization: { runtimeChunk: 'single' }
Pls expose the manifest content in that runtime chunk, I believe there is a function call jsonpScriptSrc contain such content, if u pass chunkId in, u will get the public path of that chunk as return value:

What is motivation or use case for adding/changing the behavior? I’m developing a plugin(webpack-prefetcher) to help people do better prefetch/preload in webpack
This plugin requires a manifest file to be downloaded before it can prefetch/preload anything, now I can get the manifest file by the WebpackManifestPlugin
But if runtime chunk already has manifest data, the use of this manifest plugin is quite unnecessary in my opinion.
How should this be implemented in your opinion?
Modify the runtime chunk file’s template, expose the jsonpScriptSrc function.
Are you willing to work on this yourself? yes! but need some guidance…
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)

Top Related StackOverflow Question
@evilebottnawi I understand, and I found a way around this without changing the source code of webpack 4.
I wrote a webpack plugin to tap
mainTemplate.hooks.localVarshook in the lower priority to achieve this:Really hacky but it works perfect for me. 😛
Issue was closed because of inactivity.
If you think this is still a valid issue, please file a new issue with additional information.