Feature(custom): split i18n in main and renderer, use vue-i18n

This commit is contained in:
Kuingsmile
2025-08-01 13:10:05 +08:00
parent ff95e0f6fe
commit 236b7c6e7d
76 changed files with 4310 additions and 5986 deletions
+10 -3
View File
@@ -1,8 +1,9 @@
import { resolve } from 'node:path'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import vue from '@vitejs/plugin-vue'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
export default defineConfig({
main: {
// Main process configuration
@@ -22,7 +23,13 @@ export default defineConfig({
},
preload: {
// Preload scripts configuration
plugins: [externalizeDepsPlugin()],
plugins: [externalizeDepsPlugin(),
VueI18nPlugin({
/* options */
// locale messages resource pre-compile option
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/renderer/i18n/locales/**')
})
],
resolve: {
alias: {
'@': resolve('src/renderer'),