forked from canisminor1990/bilibili-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.webpackrc.js
More file actions
46 lines (45 loc) · 1001 Bytes
/
.webpackrc.js
File metadata and controls
46 lines (45 loc) · 1001 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
40
41
42
43
44
45
46
import cssnano from 'cssnano';
import pxtorem from 'postcss-pxtorem';
export default {
entry : './src/renderer/index.js',
outputPath : './app/pages',
define : {
'$dirname': __dirname
},
disableCSSModules : false,
html : {
template: './src/renderer/index.ejs'
},
sass : {
includePaths: ['node_modules', 'src/renderer/style']
},
theme : {
'primary-color': '#f25d8e'
},
extraPostCSSPlugins: [
pxtorem({rootValue: 16})
],
extraBabelPlugins : [
'transform-decorators-legacy',
'lodash',
['import', {libraryName: 'antd', libraryDirectory: 'es', style: true}]
],
externals : {
'electron': 'require("electron")',
},
env : {
development: {
extraBabelPlugins: [
'dva-hmr'
]
},
production : {
extraPostCSSPlugins: [
cssnano(
{safe: true},
{preset: ['default', {discardComments: {removeAll: true}}]})
]
}
},
ignoreMomentLocale : true
};