Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9328 from jchapman127/bugfix/match-resource
[WIP] Fixes #9053: Wrong loaders order when using inline match resource
- Loading branch information
Showing
8 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = ["b"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = ["c"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
it("should apply inline loaders before matchResource", function() { | ||
var foo = require("c.js!=!loader1!./b.js"); | ||
|
||
expect(foo).toEqual(["b", "1", "2"]); | ||
}); | ||
|
||
it("should apply config loaders before inline loaders", function() { | ||
var foo = require("loader1!./c.js"); | ||
|
||
expect(foo).toEqual(["c", "2", "1"]); | ||
}); | ||
|
||
it("should not apply config loaders when matchResource is used", function() { | ||
var foo = require("d.js!=!loader1!./c.js"); | ||
|
||
expect(foo).toEqual(["c", "1", "3"]); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /c\.js$/, | ||
use: ["loader2"] | ||
}, | ||
{ | ||
test: /d\.js$/, | ||
use: ["loader3"] | ||
} | ||
] | ||
} | ||
}; |