-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathwebpack.config.js
More file actions
39 lines (38 loc) · 982 Bytes
/
webpack.config.js
File metadata and controls
39 lines (38 loc) · 982 Bytes
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('webpack');
const WebpackShellPlugin = require('webpack-shell-plugin');
module.exports = {
entry: "./test.js",
output: {
path: __dirname + "/build/",
filename: "bundle.js"
},
devtool: "source-map",
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules, build)/,
loader: 'babel',
query: {
presets: ['es2015']
}
}
]
},
externals: {
"broadway": "broadway-player"
},
plugins:[
new webpack.optimize.DedupePlugin(),
new WebpackShellPlugin({
onBuildStart:[/*'say begin'*/],
onBuildEnd:[
'sed "s/{{buildTime}}/$(date)/g" index.template.html > index.html',
//'say end!'
//'say world; open "/Applications/Google Chrome.app"',
//'sleep 1; say chrome & osascript ./misc/reloadChrome.scpt "http://localhost:63342/web-rtmp/index.html"'
],
dev:false}
)
]
};