-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathwebpack.client.babel.js
44 lines (38 loc) · 1.08 KB
/
webpack.client.babel.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
import base from './webpack.base.babel.js';
import path from 'path';
import webpack from 'webpack';
const {WDS_PORT, PORT, APP_WEB_BASE_PATH} = process.env;
export default {
...base,
entry: "./src/app/_client.js",
output: {
path: path.join(__dirname, 'dist', 'static'),
filename: "app.js",
publicPath: `${APP_WEB_BASE_PATH}/`
},
plugins: base.plugins
.concat(process.env.NODE_ENV==="production"
? [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
},
sourcemaps: true
})
]
: []
),
devServer: {
publicPath: '/static/',
contentBase: `http://localhost:${PORT}/static`,
historyApiFallback: true,
progress: false,
stats: 'errors-only',
compress: true,
port: WDS_PORT,
proxy: {
"**": `http://localhost:${PORT}`
}
}
};