I am the maintainer of external-svg-sprite-loader and I noticed that when using it with webpack 5 I get the following warning:
[DEP_WEBPACK_CHUNK_MODULES_ITERABLE] DeprecationWarning: Chunk.modulesIterable: Use new ChunkGraph API
The build passes but I would like to able to fix this deprecation warning. However, I can't find any documentation about modulesIterable
or the ChunkGraph API. Where should I look for it and what would be a potential solution for this issue?
If you want to iterate through modules in chunk, you could do it like this: compilation.chunks.forEach (chunk => { compilation.chunkGraph.getChunkModules (chunk).forEach ( (module) => { // module is available here }) }); You could find other useful methods of this class in its source code.
Bookmark this question. Show activity on this post. When I install a local python package with pip 21.1 ( pip install . )I get a deprecation warning: DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory.
The npm WARN deprecated message means that the package installed on your project is not recommended for use. This may be due to issues found with the package or it’s no longer maintained. You may not even see these packages in your package.json file because they are dependencies of the packages that you are using.
Fixing the apt-key deprecation error on Ubuntu can be done a number of ways. The recommended method from AskUbuntu is as follows. First, open a new Terminal window and then look inside your legacy apt-key file by running this command: Depending on your system you may see a couple of entries appear or a veritable avalanche.
If you want to iterate through modules in chunk, you could do it like this:
compilation.chunks.forEach(chunk => {
compilation.chunkGraph.getChunkModules(chunk).forEach((module) => {
// module is available here
})
});
You could find other useful methods of this class in its source code. If you want to manipulate modules in chunk, probably it's better to use ModuleGraph class. For example:
compilation.chunks.forEach(chunk => {
compilation.chunkGraph.getChunkModules(chunk).forEach((module) => {
const exportInfo = compilation.chunkGraph.moduleGraph.getExportInfo(module);
})
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With