feat(i18n): 更新国际化组件,优化语言文件和结构,增强类型支持
This commit is contained in:
@ -3,8 +3,8 @@ import { unheadVueComposablesImports } from '@unhead/vue';
|
||||
import { VantResolver } from '@vant/auto-import-resolver';
|
||||
import Vue from '@vitejs/plugin-vue';
|
||||
import VueJsx from '@vitejs/plugin-vue-jsx';
|
||||
import { dirname } from 'node:path';
|
||||
import { fileURLToPath, resolve, URL } from 'node:url';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
import UnoCSS from 'unocss/vite';
|
||||
import { type ImportsMap } from 'unplugin-auto-import/types';
|
||||
import AutoImport from 'unplugin-auto-import/vite';
|
||||
@ -145,7 +145,14 @@ function Plugins() {
|
||||
VueI18nPlugin({
|
||||
/* options */
|
||||
// locale messages resource pre-compile option
|
||||
include: resolve(dirname(fileURLToPath(import.meta.url)), './path/to/src/locales/**'),
|
||||
include: [path.resolve(__dirname, './src/locales/**')],
|
||||
|
||||
// https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n#transformi18nblock
|
||||
// transformI18nBlock(src) {
|
||||
// console.debug(`src :>> `, src);
|
||||
// console.debug(`typeof src :>> `, typeof src);
|
||||
// return src as string;
|
||||
// },
|
||||
}),
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user