-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
36 lines (34 loc) · 903 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
32
33
34
35
36
const { defineConfig } = require('@vue/cli-service')
const path = require('path')
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = defineConfig({
publicPath: process.env.NODE_ENV === 'production' ? 'compress-vue' : '/',
productionSourceMap: false, // 不生成js.map文件
filenameHashing: false, // 生成文件不带hash值
transpileDependencies: true,
lintOnSave: false,
configureWebpack: {
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
name: 'officeweb-compress',
resolve: {
alias: {
'@': resolve('src')
}
}
},
devServer: {
port: 8081,
proxy: {
'/structure': {
target: 'http://localhost:8080',
changeOrigin: true
// pathRewrite: {
// '^/api': '/mock'
// }
}
}
}
})