Skip to content

Commit

Permalink
Merge pull request #16635 from PengBoUESTC/chore/enabledLibraryTypes-opt
Browse files Browse the repository at this point in the history
chore: enabledLibraryTypes push opt
  • Loading branch information
TheLarkInn committed Mar 21, 2023
2 parents 39fbd73 + eec7f62 commit a3f49f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/container/ContainerPlugin.js
Expand Up @@ -64,7 +64,9 @@ class ContainerPlugin {
const { name, exposes, shareScope, filename, library, runtime } =
this._options;

compiler.options.output.enabledLibraryTypes.push(library.type);
if (!compiler.options.output.enabledLibraryTypes.includes(library.type)) {
compiler.options.output.enabledLibraryTypes.push(library.type);
}

compiler.hooks.make.tapAsync(PLUGIN_NAME, (compilation, callback) => {
const dep = new ContainerEntryDependency(name, exposes, shareScope);
Expand Down

0 comments on commit a3f49f3

Please sign in to comment.