-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
41 lines (37 loc) · 955 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
const path = require('path');
//const WebpackShellPlugin = require('webpack-shell-plugin');
const webpack = require('webpack');
const WebpackShellPlugin = require('webpack-shell-plugin');
const plugins = [
new WebpackShellPlugin({
onBuildStart: 'sh ./build/prebuild.sh'
})
];
//plugins.push(new webpack.optimize.UglifyJsPlugin({ output: {comments: false} }));
// plugins.push(new WebpackShellPlugin({
// onBuildStart: ['echo "Starting"'],
// onBuildEnd: ['./uploadFile.sh']
// }));
const mocks = __dirname + "/build/Mocks.js";
module.exports = [{
devtool: "source-map",
entry: ["./index.js"],
output: {
path: __dirname + "/dist",
filename: "index_bundle.js",
publicPath: '/dist/',
sourceMapFilename: "index_bundle.js.map"
},
plugins: plugins,
module: {
loaders: []
},
resolve: {
alias: {
express: mocks,
"body-parser": mocks,
"uuid": mocks,
"colors/safe": mocks
}
}
}];