-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
39 lines (39 loc) · 963 Bytes
/
Copy pathvue.config.js
File metadata and controls
39 lines (39 loc) · 963 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
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
outputDir: 'dist',
assetsDir: 'static',
productionSourceMap: false,
chainWebpack: config => {
config.plugin('define').tap(args => {
Object.assign(args[0], {
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
__VUE_PROD_DEVTOOLS__: false
})
return args
})
},
pages: {
index: {
entry: 'src/main.js',
template: 'public/index.html',
title: '猪猪记账本',
favicon: './src/assets/logo.png'
}
},
devServer: {
port: 8080,
proxy: {
'/api': {
target: process.env.NODE_ENV === 'development'
? 'http://localhost:8081'
: 'https://api.money-keeper.com',
changeOrigin: true,
pathRewrite: {
'^/api': '/api'
}
}
}
}
})