wrapper-webpack-plugin icon indicating copy to clipboard operation
wrapper-webpack-plugin copied to clipboard

Fix deprecation error

Open haisol opened this issue 1 year ago • 0 comments

Fix the deprecation error as shown below: compiler.hooks.compilation.tap('WrapperPlugin', (compilation) => { if (this.afterOptimizations) { // you can fix this similar to how I fixed the else statement. compilation.hooks.afterOptimizeChunkAssets.tap('DSWrapperPlugin', (chunks) => { wrapChunks(compilation, chunks, footer, header); }); } else { compilation.hooks.chunkAsset.tap( { name: 'WrapperPlugin', stage: compilation.PROCESS_ASSETS_STAGE_ADDITIONS, additionalAssets: false, }, (assets) => { wrapChunks(compilation, [assets], footer, header); } ); } });

haisol avatar Dec 07 '24 17:12 haisol