forked from baiy/Ctool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
31 lines (28 loc) · 857 Bytes
/
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
let adapter = require('./src/tool/adapter');
let pages = {}
pages.tool = {
entry: 'src/tool.js',
template: 'public/tool.html',
};
const config = {
productionSourceMap: false,
publicPath: "./",
pages: pages,
chainWebpack: config => {
config.plugin('define').tap(args => {
args[0]['process.ctool'] = JSON.stringify({
version: process.env.npm_package_version,
updateTime: Date.parse((new Date()).toString()) / 1000,
platform: adapter.platform,
isChrome: adapter.isChrome,
isEdge: adapter.isEdge,
isChromium: adapter.isChromium,
isWeb: adapter.isWeb,
isUtools: adapter.isUtools,
});
return args
})
},
};
adapter.initialize()
module.exports = config;