Files
apes-Authon-Web/vue.config.js
T
gitea-publish 8ebd1ca157 feat: 前端账权剥离完成 — 移除业务模块,保留账权 + 系统配置 + AI/LLM
- 删除 82 个业务页面(fei/trace/weight/tracing/irrigation/huoban 等 18 目录)
- 删除 30+ 个业务 API 文件
- 删除业务组件(brain/tracing/MarkdownContent 原版)
- 删除业务 Utils(ezviz/tracing/huoban/markdown/wangEdit)
- 修改 8 个框架文件(router/main.js/request.js/store/vue.config.js/package.json/index.html/.gitignore)
- 修复 9 个残留引用(TopHeader/iframeView/menuApi/permissionApi/home/login/customer/uiConfig)
- 新建简化版 MarkdownContent.vue(使用 marked + highlight.js)
- 保留 monaco-editor 依赖(AI 工具编辑器需要)
- 添加 README.md
- npm run build:prod 验证通过
2026-08-09 12:36:09 +08:00

89 lines
2.0 KiB
JavaScript

'use strict'
const path = require('path')
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
outputDir: "authon-web",
lintOnSave: false,
productionSourceMap: false,
devServer: {
host: '0.0.0.0',
port: 8201,
open: 'http://localhost:8201/',
disableHostCheck: true,
compress: true,
overlay: {
warnings: false,
errors: true
},
proxy: {
'/api/user-service': {
target: 'http://localhost:8202',
changeOrigin: true,
pathRewrite: {
'^/api/user-service': '/'
}
}
}
},
configureWebpack: {
externals: {
'vue': 'Vue',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'element-ui': 'ELEMENT',
'axios': 'axios'
},
name: 'apes-Authon',
resolve: {
alias: {
'@': resolve('src')
}
},
optimization: {
splitChunks: {
chunks: 'all',
maxInitialRequests: Infinity,
minSize: 20000,
cacheGroups: {
elementUI: {
name: 'chunk-element-ui',
test: /[\\/]node_modules[\\/]element-ui[\\/]/,
priority: 30,
reuseExistingChunk: true
},
vue: {
name: 'chunk-vue',
test: /[\\/]node_modules[\\/](vue|vue-router|vuex)[\\/]/,
priority: 30,
reuseExistingChunk: true
},
axios: {
name: 'chunk-axios',
test: /[\\/]node_modules[\\/]axios[\\/]/,
priority: 30,
reuseExistingChunk: true
},
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
reuseExistingChunk: true
}
}
}
}
},
chainWebpack(config) {
config.plugins.delete('preload')
config.plugins.delete('prefetch')
config.plugins.delete('optimize-css');
}
}