-
Notifications
You must be signed in to change notification settings - Fork 15
/
.webpackrc.js
43 lines (42 loc) · 1.27 KB
/
.webpackrc.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
const path = require('path')
export default {
entry: 'src/index.js',
extraBabelPlugins: [
// ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": true }],
["lodash", { "id": ["async", "lodash-bound"] }]
],
"env": {
"development": {
"extraBabelPlugins": ["dva-hmr"]
},
},
// extraBabelPresets:[
// ["@babel/env", { "targets": { "node": 6 } }]
// ],
"html": {
"template": "./src/index.ejs"
},
hash: true,
publicPath: '/',
proxy: {
"/api/*": {
target: 'http://192.168.70.131:5003',
changeOrigin: true
}
},
alias: {
"@routes": path.resolve(__dirname, "./src/routes"),
"@models": path.resolve(__dirname, "./src/models"),
"@services": path.resolve(__dirname, "./src/services"),
"@components": path.resolve(__dirname, "./src/components"),
"@utils": path.resolve(__dirname, "./src/utils"),
"@assets": path.resolve(__dirname, "./src/assets"),
"@constants": path.resolve(__dirname, "./src/constants"),
"@common": path.resolve(__dirname, "./src/common"),
"@mock": path.resolve(__dirname, "./mock"),
"@plugins": path.resolve(__dirname, "./src/plugins"),
"@styles": path.resolve(__dirname, "./src/styles")
},
ignoreMomentLocale: true,
theme: './src/utils/lessvar.js'
}