Skip to content

Commit

Permalink
optimization.sideEffects is compatible with cacheUnaffected
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Oct 5, 2021
1 parent 56653f8 commit da098d7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
6 changes: 0 additions & 6 deletions lib/optimize/SideEffectsFlagPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,6 @@ class SideEffectsFlagPlugin {
stage: STAGE_DEFAULT
},
modules => {
if (compilation.moduleMemCaches) {
throw new Error(
"optimization.sideEffects can't be used with cacheUnaffected as side effects optimization is a global effect"
);
}

const logger = compilation.getLogger(
"webpack.SideEffectsFlagPlugin"
);
Expand Down
3 changes: 0 additions & 3 deletions test/WatchCacheUnaffectedTestCases.longtest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ describeCases({
name: "WatchCacheUnaffectedTestCases",
experiments: {
cacheUnaffected: true
},
optimization: {
sideEffects: false
}
});

0 comments on commit da098d7

Please sign in to comment.