Skip to content

Commit a732888

Browse files
committed
added another test case for dlls
1 parent c3e6fcf commit a732888

3 files changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "../0-create-dll/e1";
2+
export * from "../0-create-dll/e2";
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
var should = require("should");
2+
import d from "../0-create-dll/d";
3+
import { x1, y2 } from "./e";
4+
import { x2, y1 } from "../0-create-dll/e";
5+
6+
it("should load a module from dll", function() {
7+
require("../0-create-dll/a").should.be.eql("a");
8+
});
9+
10+
it("should load an async module from dll", function() {
11+
require("../0-create-dll/b")().then(function(c) {
12+
c.should.be.eql({ default: "c" });
13+
});
14+
});
15+
16+
it("should load an harmony module from dll (default export)", function() {
17+
d.should.be.eql("d");
18+
});
19+
20+
it("should load an harmony module from dll (star export)", function() {
21+
x1.should.be.eql(123);
22+
x2.should.be.eql(123);
23+
y1.should.be.eql(456);
24+
y2.should.be.eql(456);
25+
});
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
var path = require("path");
2+
var webpack = require("../../../../");
3+
4+
module.exports = {
5+
plugins: [
6+
new webpack.DllReferencePlugin({
7+
manifest: require("../../../js/config/dll-plugin/manifest0.json"),
8+
name: "../0-create-dll/dll.js",
9+
context: path.resolve(__dirname, "../0-create-dll"),
10+
sourceType: "commonjs2"
11+
})
12+
]
13+
}

0 commit comments

Comments
 (0)