Skip to content

Commit

Permalink
Update ModuleNotFoundPlugin to support Webpack 5 (#10205)
Browse files Browse the repository at this point in the history
  • Loading branch information
raix authored Mar 17, 2021
1 parent 48d7ffe commit 5fc8350
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react-dev-utils/ModuleNotFoundPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,13 @@ class ModuleNotFoundPlugin {
const { prettierError } = this;
compiler.hooks.make.intercept({
register(tap) {
// "SingleEntryPlugin" can be removed when Webpack 4 no longer have to be supported
if (
!(tap.name === 'MultiEntryPlugin' || tap.name === 'SingleEntryPlugin')
!(
tap.name === 'MultiEntryPlugin' ||
tap.name === 'SingleEntryPlugin' ||
tap.name === 'EntryPlugin'
)
) {
return tap;
}
Expand Down

0 comments on commit 5fc8350

Please sign in to comment.