fix: 解决没有 xpack 打包报错的问题 (#4400)

This commit is contained in:
zhengkunwang 2024-04-03 17:40:07 +08:00 committed by GitHub
parent 6ff0f14841
commit bb4fd69f3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 12 deletions

View File

@ -1,9 +1,9 @@
import fit2cloudEnLocale from 'fit2cloud-ui-plus/src/locale/lang/en';
let xpackEnLocale = {};
try {
const commercialTranslationModule = await import('@/xpack/lang/en');
xpackEnLocale = commercialTranslationModule.default || {};
} catch (error) {}
const xpackModules = import.meta.globEager('../../xpack/lang/en.ts');
if (xpackModules['../../xpack/lang/en.ts']) {
xpackEnLocale = xpackModules['../../xpack/lang/en.ts'].default || {};
}
const message = {
commons: {

View File

@ -1,9 +1,10 @@
import fit2cloudTwLocale from 'fit2cloud-ui-plus/src/locale/lang/zh-cn';
let xpackTwLocale = {};
try {
const commercialTranslationModule = await import('@/xpack/lang/tw');
xpackTwLocale = commercialTranslationModule.default || {};
} catch (error) {}
const xpackModules = import.meta.globEager('../../xpack/lang/tw.ts');
if (xpackModules['../../xpack/lang/tw.ts']) {
xpackTwLocale = xpackModules['../../xpack/lang/tw.ts'].default || {};
}
const message = {
commons: {
true: '是',

View File

@ -1,9 +1,9 @@
import fit2cloudZhLocale from 'fit2cloud-ui-plus/src/locale/lang/zh-cn';
let xpackZhLocale = {};
try {
const commercialTranslationModule = await import('@/xpack/lang/zh');
xpackZhLocale = commercialTranslationModule.default || {};
} catch (error) {}
const xpackModules = import.meta.globEager('../../xpack/lang/zh.ts');
if (xpackModules['../../xpack/lang/zh.ts']) {
xpackZhLocale = xpackModules['../../xpack/lang/zh.ts'].default || {};
}
const message = {
commons: {