feat(i18n): 移除国际化
All checks were successful
/ build-and-deploy-to-vercel (push) Successful in 2m8s
/ playwright (push) Successful in 2m26s
/ depcheck (push) Successful in 1m36s

This commit is contained in:
严浩
2024-11-07 10:38:42 +08:00
parent 4dd414e4bf
commit a4cc30f816
6 changed files with 16 additions and 320 deletions

View File

@ -1,4 +1,3 @@
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
import { unheadVueComposablesImports } from '@unhead/vue';
import { VantResolver } from '@vant/auto-import-resolver';
import Vue from '@vitejs/plugin-vue';
@ -23,7 +22,6 @@ import cdnImport from 'vite-plugin-cdn-import';
import { vitePluginFakeServer } from 'vite-plugin-fake-server';
import vueDevTools from 'vite-plugin-vue-devtools';
import { ViteWebfontDownload } from 'vite-plugin-webfont-dl';
import { resolve, dirname } from 'node:path';
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
@ -49,7 +47,8 @@ export default defineConfig(({ mode, command }) => {
rollupOptions: {
onwarn: (warning, warn) => {
if (warning.code === 'EMPTY_BUNDLE') return;
if (warning.code === 'EVAL' && warning.message.includes('node_modules/.pnpm/eruda')) return;
if (warning.code === 'EVAL' && warning.id?.includes('node_modules/eruda')) return;
if (warning.code === 'EVAL' && warning.id?.includes('node_modules/mockjs')) return;
warn(warning);
},
output: env.VITE_SPLIT_CHUNKS === 'true' ? createSplitChunkOutput() : undefined,
@ -141,16 +140,6 @@ function Plugins() {
}),
);
plugins.push(
VueI18nPlugin({
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/locales/**'),
// 可选:指定语言文件格式,默认为 json
// runtimeOnly: false,
// compositionOnly: false,
// fullInstall: true
}),
);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const unused = () => {
plugins.push(