Skip to content

Commit 29876d7

Browse files
raixwombleton
authored andcommitted
Update ModuleNotFoundPlugin to support Webpack 5 (facebook#10205)
1 parent be74fea commit 29876d7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react-dev-utils/ModuleNotFoundPlugin.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,13 @@ class ModuleNotFoundPlugin {
100100
const { prettierError } = this;
101101
compiler.hooks.make.intercept({
102102
register(tap) {
103+
// "SingleEntryPlugin" can be removed when Webpack 4 no longer have to be supported
103104
if (
104-
!(tap.name === 'MultiEntryPlugin' || tap.name === 'SingleEntryPlugin')
105+
!(
106+
tap.name === 'MultiEntryPlugin' ||
107+
tap.name === 'SingleEntryPlugin' ||
108+
tap.name === 'EntryPlugin'
109+
)
105110
) {
106111
return tap;
107112
}

0 commit comments

Comments
 (0)