mirror of https://github.com/webpack/webpack.git
flag modules in dlls without entryOnly with side-effects to keep them
This commit is contained in:
parent
1e2634fdd8
commit
06fcc0ad12
|
|
@ -40,6 +40,10 @@ class FlagAllModulesAsUsedPlugin {
|
|||
const exportsInfo = moduleGraph.getExportsInfo(module);
|
||||
exportsInfo.setUsedInUnknownWay(runtime);
|
||||
moduleGraph.addExtraReason(module, this.explanation);
|
||||
if (module.factoryMeta === undefined) {
|
||||
module.factoryMeta = {};
|
||||
}
|
||||
module.factoryMeta.sideEffectFree = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
export default "d";
|
||||
console.log.bind(console);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ it("should give modules the correct ids", function() {
|
|||
"../0-create-dll/f.jsx",
|
||||
"../0-create-dll/g.abc.js",
|
||||
"../0-create-dll/h.js",
|
||||
"../0-create-dll/hb.js",
|
||||
"../0-create-dll/h1.js",
|
||||
"./index.js",
|
||||
"dll-reference ../0-create-dll/dll.js"
|
||||
]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue