forked from webpack/webpack
/
webpack.config.js
39 lines (39 loc) · 904 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var webpack = require("../../../../");
module.exports = {
node: {
__dirname: false,
__filename: false
},
entry: {
bundle0: ["./index.js"],
vendors: ["./vendors.js"]
},
output: {
filename: "[name].js"
},
plugins: [
new webpack.BannerPlugin("banner is a string"),
new webpack.BannerPlugin(() => "banner is a function"),
new webpack.BannerPlugin({
banner: "A test value",
exclude: ["vendors.js"]
}),
new webpack.BannerPlugin({
banner: "A test value in single file",
include: ["vendors.js"]
}),
new webpack.BannerPlugin({
banner: "Match test file",
test: /vendors\.js$/
}),
new webpack.BannerPlugin({
banner: ({ chunk }) => `multiline\nbanner\n${chunk.name}`
}),
new webpack.BannerPlugin(
"trim trailing whitespace\t \n\ntrailing whitespace "
),
new webpack.BannerPlugin(
"trim trailing whitespace\t \n\nno trailing whitespace"
)
]
};