Skip to content

Commit 392b0c3

Browse files
committed
moved banner plugin placeholdertesting to new dir
1 parent e557559 commit 392b0c3

5 files changed

Lines changed: 38 additions & 1 deletion

File tree

lib/BannerPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class BannerPlugin {
4646
const banner = this.banner;
4747

4848
compiler.plugin("compilation", (compilation) => {
49-
console.log('compilation: ', compilation);
49+
console.log('compilation: ', JSON.stringify(compilation));
5050
compilation.plugin("optimize-chunk-assets", (chunks, callback) => {
5151
chunks.forEach((chunk) => {
5252
if(options.entryOnly && !chunk.isInitial()) return;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
it("should interpolate file hash in bundle0 chunk", function() {
2+
var fs = require("fs");
3+
var source = fs
4+
.readFileSync(__filename, "utf-8")
5+
.split("\n")
6+
.slice(0,1)[0];
7+
8+
source.should.not.containEql("hash");
9+
});
10+
11+
require.include("./test.js");
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
var foo = {};
2+
3+
module.exports = foo;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
var bar = {};
2+
3+
module.exports = bar;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var webpack = require("../../../../");
2+
module.exports = {
3+
node: {
4+
__dirname: false,
5+
__filename: false
6+
},
7+
entry: {
8+
bundle0: ["./index.js"],
9+
vendors: ["./vendors.js"]
10+
},
11+
output: {
12+
filename: "[name].js"
13+
},
14+
plugins: [
15+
new webpack.BannerPlugin({
16+
banner: "[hash]",
17+
exclude: ["vendors.js"]
18+
})
19+
]
20+
};

0 commit comments

Comments
 (0)