Skip to content

Commit 99a5793

Browse files
committed
throw error when using module concatenation and cacheUnaffected
optimization.concatenateModules can't be used with cacheUnaffected as module concatenation is a global effect
1 parent 05ebf5b commit 99a5793

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/optimize/ModuleConcatenationPlugin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ class ModuleConcatenationPlugin {
5858
apply(compiler) {
5959
const { _backCompat: backCompat } = compiler;
6060
compiler.hooks.compilation.tap("ModuleConcatenationPlugin", compilation => {
61+
if (compilation.moduleMemCaches) {
62+
throw new Error(
63+
"optimization.concatenateModules can't be used with cacheUnaffected as module concatenation is a global effect"
64+
);
65+
}
6166
const moduleGraph = compilation.moduleGraph;
6267
const bailoutReasonMap = new Map();
6368

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy