Skip to content

Commit 36ca505

Browse files
committed
fix(deprecation): Fix webpack deprecation warning
1 parent 408dfb0 commit 36ca505

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ module.exports = function PurifyPlugin(options) {
3636
compilation.plugin('additional-assets', (cb) => {
3737
// Go through chunks and purify as configured
3838
compilation.chunks.forEach(
39-
({ name: chunkName, files, modules }) => {
39+
(chunk) => {
40+
const { name: chunkName, files } = chunk;
41+
const modules = chunk.mapModules(module => module);
4042
const assetsToPurify = search.assets(
4143
compilation.assets, options.styleExtensions
4244
).filter(

0 commit comments

Comments
 (0)