2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

fix: 前端编译

This commit is contained in:
耗子
2024-10-10 02:46:15 +08:00
parent 95f0e0d536
commit e02de8ba05
2 changed files with 10 additions and 3 deletions

View File

@@ -30,8 +30,8 @@ export function initThemeSettings(): Theme.Setting {
warning: '#faad14',
error: '#f5222d'
}
const language = themeSetting.language || 'zh_CN'
return { isMobile, darkMode, sider, header, tab, primaryColor, otherColor, language }
const locale = themeSetting.locale || 'zh_CN'
return { isMobile, darkMode, sider, header, tab, primaryColor, otherColor, locale }
}
/** 获取naive的主题颜色 */

View File

@@ -1,9 +1,9 @@
import type { ConfigEnv } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import { convertEnv, getRootPath, getSrcPath } from './build/utils'
import { createViteProxy, viteDefine } from './build/config'
import { setupVitePlugins } from './build/plugins'
import { convertEnv, getRootPath, getSrcPath } from './build/utils'
export default defineConfig((configEnv: ConfigEnv) => {
const srcPath = getSrcPath()
@@ -35,6 +35,13 @@ export default defineConfig((configEnv: ConfigEnv) => {
commonjsOptions: {
ignoreTryCatch: false
}
},
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler' // or 'modern'
}
}
}
}
})