39 lines
836 B
JavaScript
39 lines
836 B
JavaScript
const { defineConfig } = require('@vue/cli-service')
|
|
|
|
module.exports = defineConfig({
|
|
transpileDependencies: true,
|
|
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
|
|
outputDir: 'dist',
|
|
assetsDir: 'static',
|
|
lintOnSave: false,
|
|
devServer: {
|
|
port: 8080,
|
|
open: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:5352',
|
|
changeOrigin: true,
|
|
pathRewrite: {
|
|
'^/api': '/api'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
configureWebpack: {
|
|
resolve: {
|
|
alias: {
|
|
'@': require('path').resolve(__dirname, 'src')
|
|
}
|
|
}
|
|
},
|
|
chainWebpack: config => {
|
|
config.plugin('define').tap(definitions => {
|
|
Object.assign(definitions[0], {
|
|
__VUE_OPTIONS_API__: 'true',
|
|
__VUE_PROD_DEVTOOLS__: 'false'
|
|
})
|
|
return definitions
|
|
})
|
|
}
|
|
})
|