-
Notifications
You must be signed in to change notification settings - Fork 44
/
vue.config.js
54 lines (53 loc) · 1.36 KB
/
vue.config.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
//让打包的时候输出可配置的文件
var GenerateAssetPlugin = require("generate-asset-webpack-plugin");
var createServerConfig = function(_compilation) {
let cfgJson = {
// 默认指向 window.location.origin
baseURL: ""
};
return JSON.stringify(cfgJson);
};
module.exports = {
// publicPath: ProjectConfig.publicPath,
productionSourceMap: false,
configureWebpack: {
plugins: [
new GenerateAssetPlugin({
filename: "serverconfig.json",
fn: (compilation, cb) => {
cb(null, createServerConfig(compilation));
},
extraFiles: []
})
]
// // 使用cdn引入常用包
// externals: {
// 'vue': "Vue",
// "vue-router": "VueRouter",
// "view-design":"viewDesign",
// "axios": "axios"
// }
},
pages: {
index: {
// page 的入口
entry: "src/main.js",
// 模板来源
template: "public/index.html",
// 在 dist/index.html 的输出
filename: "index.html",
// 当使用 title 选项时,
// template 中的 title 标签需要是 <title><%= htmlWebpackPlugin.options.title %></title>
title: "GONEList"
}
},
pwa: {
iconPaths: {
favicon32: "favicon.ico",
favicon16: "favicon.ico",
appleTouchIcon: "favicon.ico",
maskIcon: "favicon.ico",
msTileImage: "favicon.ico"
}
}
};