wrapper-webpack-plugin
wrapper-webpack-plugin copied to clipboard
Fix deprecation error
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); } ); } });