docs: 更新项目文档,完善需求和技术细节
This commit is contained in:
51
admin-system/vue.config.js
Normal file
51
admin-system/vue.config.js
Normal file
@@ -0,0 +1,51 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true,
|
||||
|
||||
// 开发服务器配置
|
||||
devServer: {
|
||||
port: 3250,
|
||||
host: 'localhost',
|
||||
open: true,
|
||||
hot: true,
|
||||
compress: true,
|
||||
|
||||
// 代理配置,解决跨域问题
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:3200',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': '/api/v1'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 构建配置
|
||||
configureWebpack: {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': require('path').resolve(__dirname, 'src')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 生产环境配置
|
||||
productionSourceMap: false,
|
||||
|
||||
// CSS配置
|
||||
css: {
|
||||
extract: process.env.NODE_ENV === 'production',
|
||||
sourceMap: false,
|
||||
loaderOptions: {
|
||||
sass: {
|
||||
additionalData: `
|
||||
@import "@/styles/variables.scss";
|
||||
@import "@/styles/mixins.scss";
|
||||
`
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user