Skip to content

Commit bd80cac

Browse files
committed
specify name of the bundle
1 parent 399b5f4 commit bd80cac

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
findBundle: function() {
3+
return "./main.js";
4+
}
5+
};

‎test/configCases/module-name/different-issuers-for-same-module/test.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
require("should");
12
it("should assign different names to the same module with different issuers ", function() {
23
var fs = require("fs");
34
var path = require("path");
4-
var bundle = fs.readFileSync(path.join(__dirname, "bundle0.js"), "utf-8");
5+
var bundle = fs.readFileSync(path.join(__dirname, "main.js"), "utf-8");
56
bundle.should.match(/\.\/c\.js\?\w{4}/g);
67
require("./a").should.be.equal("loader-a");
78
require("./b").should.be.equal("loader-b");

‎test/configCases/module-name/different-issuers-for-same-module/webpack.config.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module.exports = {
22
mode: "development",
3+
output: {
4+
filename: "main.js"
5+
},
36
entry: {
47
main: ["./a", "./b", "./test"]
58
},

0 commit comments

Comments
 (0)