MCPcopy
hub / github.com/webpack/webpack / hasClosureLibrary

Function hasClosureLibrary

lib/hmr/LazyCompilationPlugin.js:76–87  ·  view source on GitHub ↗
(output)

Source from the content-addressed store, hash-verified

74 * @returns {boolean} true when at least one library wrapper passes externals as closure arguments
75 */
76const hasClosureLibrary = (output) => {
77 const enabled = output.enabledLibraryTypes;
78 if (enabled) {
79 for (const type of enabled) {
80 if (CLOSURE_LIBRARY_TYPES.has(type)) return true;
81 }
82 }
83 if (output.library && output.library.type) {
84 return CLOSURE_LIBRARY_TYPES.has(output.library.type);
85 }
86 return false;
87};
88
89/**
90 * Collects request strings from statically-enumerable externals (string,

Callers 1

buildMethod · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected