-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcooking.conf.js
55 lines (53 loc) · 1.28 KB
/
cooking.conf.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
45
46
47
48
49
50
51
52
53
54
55
var cooking = require('cooking')
var devCon = require('./cooking.dev.conf.js')
var prodCon = require('./cooking.prod.conf.js')
let config = {
// entry: {
// 'vue-citys-picker': './src/index.js'
// },
// entry: './example/main.js',
dist: './dist',
// template: './index.html',
devServer: {
// 是否启用
enable: true,
// 输出文件目录的 URL 路径,注意这里的配置会覆盖下面的 publicPath
publicPath: '/',
// 热替换
hot: true,
// 提取 CSS
extractCSS: false,
// 显示日志信息在页面上
log: true,
port: 3000,
hostname: 'localhost',
protocol: 'http:',
// HTML5 history API
historyApiFallback: true,
// 控制台输出的信息
stats: 'errors-only',
noInfo: true,
quiet: false,
lazy: false
},
assetsPath: './static',
moduleName: 'vue-citys-picker',
chunk: false,
format: 'umd', //var\cjs
// Production
clean: false,
hash: false,
sourceMap: false,
extractCSS: true,
extends: ['vue', 'lint'],
alias: {
'src': require('path').join(__dirname, './src')
}
}
if(process.env.NODE_ENV === 'production') {
config = Object.assign({}, config, prodCon)
} else {
config = Object.assign({}, config, devCon)
}
cooking.set(config)
module.exports = cooking.resolve()