-
Notifications
You must be signed in to change notification settings - Fork 38
/
webpack.config.js
49 lines (48 loc) · 991 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
40
41
42
43
44
45
46
47
48
49
var pkg = require( "./package.json" );
var _ = require( "lodash" );
var webpack = require( "webpack" );
var banner = [
" * <%= pkg.name %> - <%= pkg.description %>",
" * Author: <%= pkg.author %>",
" * Version: v<%= pkg.version %>",
" * Url: <%= pkg.homepage %>",
" * License(s): <%= pkg.license %>"
].join( "\n" );
var header = _.template( banner )( { pkg: pkg } );
module.exports = {
output: {
library: "postalXframe",
libraryTarget: "umd",
filename: "postal.xframe.js"
},
devtool: "#inline-source-map",
externals: [
{
postal: true,
lodash: {
root: "_",
commonjs: "lodash",
commonjs2: "lodash",
amd: "lodash"
}
}
],
module: {
loaders: [
{
test: /\.js?$/,
exclude: /(node_modules|bower_components)/,
loader: "babel",
query: {
auxiliaryComment: "istanbul ignore next",
compact: false,
blacklist: [ "strict" ],
experimental: true
}
}
]
},
plugins: [
new webpack.BannerPlugin( header )
]
};