Skip to content

Commit a3f49f3

Browse files
authored
Merge pull request #16635 from PengBoUESTC/chore/enabledLibraryTypes-opt
chore: enabledLibraryTypes push opt
2 parents 39fbd73 + eec7f62 commit a3f49f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/container/ContainerPlugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ class ContainerPlugin {
6464
const { name, exposes, shareScope, filename, library, runtime } =
6565
this._options;
6666

67-
compiler.options.output.enabledLibraryTypes.push(library.type);
67+
if (!compiler.options.output.enabledLibraryTypes.includes(library.type)) {
68+
compiler.options.output.enabledLibraryTypes.push(library.type);
69+
}
6870

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

0 commit comments

Comments
 (0)