Skip to content

Fix deprecation error #24

@haisol

Description

@haisol

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);
}
);
}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions