mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 08:36:19 +08:00
perf: 优化env字段
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
"stub": "pnpm unbuild --stub"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/colors": "^7.0.0",
|
||||
"vite": "^4.3.0-beta.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@@ -74,7 +74,7 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) {
|
||||
output: {
|
||||
manualChunks: {
|
||||
vue: ['vue', 'pinia', 'vue-router'],
|
||||
antdv: ['ant-design-vue', '@ant-design/icons-vue'],
|
||||
antd: ['ant-design-vue', '@ant-design/icons-vue'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@@ -26,7 +26,8 @@ async function createAppConfigPlugin({
|
||||
return {
|
||||
name: PLUGIN_NAME,
|
||||
async configResolved(_config) {
|
||||
const appTitle = _config?.env?.VITE_GLOB_APP_SHORT_NAME ?? '';
|
||||
let appTitle = _config?.env?.VITE_GLOB_APP_TITLE ?? '';
|
||||
appTitle = appTitle.replace(/\s/g, '_');
|
||||
publicPath = _config.base;
|
||||
source = await getConfigSource(appTitle);
|
||||
},
|
||||
|
Reference in New Issue
Block a user