-
Notifications
You must be signed in to change notification settings - Fork 0
/
.roadhogrc.js
43 lines (42 loc) · 946 Bytes
/
.roadhogrc.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
import cssnano from 'cssnano';
import pxtorem from 'postcss-pxtorem';
export default {
entry: {
index: './src/index.js',
common: './src/vendor.js',
},
multipage: true,
publicPath: '/',
disableCSSModules: false,
hash: true,
sass: {
sourceMap: process.env.NODE_ENV === 'development',
includePaths: ['node_modules', 'src/components/style'],
},
extraPostCSSPlugins: [
pxtorem({
rootValue: 16,
propWhiteList: [],
}),
],
extraBabelPlugins: ['transform-runtime', 'lodash'],
autoprefixer: {
browsers: ['iOS >= 8', 'Android >= 4'],
},
env: {
development: {
extraBabelPlugins: ['dva-hmr'],
},
production: {
extraPostCSSPlugins: [
cssnano({
preset: ['default', { discardComments: { removeAll: true } }],
}),
],
},
},
dllPlugin: {
exclude: ['babel-runtime'],
include: ['dva/router', 'dva/saga', 'dva/fetch'],
},
};