Skip to content

Commit 97d7cec

Browse files
committed
bug #591 Fix "Missing loader" detection in Webpack 4.34.0+ (Lyrkan)
This PR was merged into the master branch. Discussion ---------- Fix "Missing loader" detection in Webpack 4.34.0+ In `[email protected]` having a missing loader can trigger a "You may need an **additional** loader" error message instead of the one we are currently looking for ("You may need an **appropriate** loader"), which causes one of our CI jobs to fail. This PR fixes it by detecting both versions. Related commit: webpack/webpack@45582c5#diff-34f95d7b09e1170360b8660f36c8b96fR26 Commits ------- a798ae9 Fix "Missing loader" detection in Webpack 4.34.0+
2 parents b1e27b9 + a798ae9 commit 97d7cec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/friendly-errors/transformers/missing-loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function isMissingLoaderError(e) {
1616
return false;
1717
}
1818

19-
if (!e.message.includes('You may need an appropriate loader')) {
19+
if (!/You may need an (appropriate|additional) loader/.test(e.message)) {
2020
return false;
2121
}
2222

0 commit comments

Comments
 (0)