mirror of https://github.com/webpack/webpack.git
add a test case
This commit is contained in:
parent
db4fd411c4
commit
0e3795bf77
|
@ -0,0 +1 @@
|
|||
module.exports = require("./c");
|
|
@ -0,0 +1 @@
|
|||
module.exports = require("./c");
|
|
@ -0,0 +1 @@
|
|||
module.exports = "c";
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = function(src) {
|
||||
return `module.exports = "loader-a"`;
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = function(src) {
|
||||
return `module.exports = "loader-b"`;
|
||||
};
|
|
@ -0,0 +1,7 @@
|
|||
it("should assign different names to the same module with different issuers ", function() {
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var bundle = fs.readFileSync(path.join(__dirname, "bundle0.js"), "utf-8");
|
||||
bundle.should.containEql("./a.js~./c.js");
|
||||
bundle.should.containEql("./a.js~./c.js");
|
||||
});
|
|
@ -0,0 +1,23 @@
|
|||
module.exports = {
|
||||
mode: "development",
|
||||
entry: {
|
||||
main: ["./a", "./b", "./test"]
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /c\.js/,
|
||||
issuer: /a\.js/,
|
||||
loader: "./loader-a"
|
||||
},
|
||||
{
|
||||
test: /c\.js/,
|
||||
issuer: /b\.js/,
|
||||
loader: "./loader-b"
|
||||
}
|
||||
]
|
||||
},
|
||||
node: {
|
||||
__dirname: false
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue