mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-04-29 08:12:41 +08:00
feat: 搭建多语言框架
This commit is contained in:
@@ -2,6 +2,7 @@ import { resolve } from 'path'
|
||||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import ui from '@nuxt/ui/vite'
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||
|
||||
export default defineConfig(() => {
|
||||
return {
|
||||
@@ -47,6 +48,14 @@ export default defineConfig(() => {
|
||||
},
|
||||
},
|
||||
}),
|
||||
VueI18nPlugin({
|
||||
// 指定全局语言包目录
|
||||
include: [resolve(__dirname, 'src/i18n/locales/**')],
|
||||
// 默认语言
|
||||
defaultSFCLang: 'json',
|
||||
// 启用组件内 <i18n> 块
|
||||
compositionOnly: true,
|
||||
}),
|
||||
],
|
||||
root: 'src/',
|
||||
build: {
|
||||
|
||||
Reference in New Issue
Block a user