Skip to content

Fix deprecation error #24

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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