Merge pull request #11958 from dataease/pr@dev-v2_st

test: 小文件合并测试
This commit is contained in:
dataeaseShu 2024-09-03 14:51:50 +08:00 committed by GitHub
commit e0af285502
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -19,9 +19,15 @@ export default {
chunkFileNames: `assets/chunk/[name]-${pkg.version}-${pkg.name}.js`, chunkFileNames: `assets/chunk/[name]-${pkg.version}-${pkg.name}.js`,
assetFileNames: `assets/[ext]/[name]-${pkg.version}-${pkg.name}.[ext]`, assetFileNames: `assets/[ext]/[name]-${pkg.version}-${pkg.name}.[ext]`,
entryFileNames: `js/[name]-${pkg.version}-${pkg.name}.js`, entryFileNames: `js/[name]-${pkg.version}-${pkg.name}.js`,
manualChunks(id: string) { manualChunks(id: string, { getModuleInfo }) {
if (id.includes('node_modules')) { if (id.includes('node_modules')) {
return id.toString().split('node_modules/')[1].split('/')[0].toString() return id.toString().split('node_modules/')[1].split('/')[0].toString()
} else if (
id.includes('.vue') &&
['App.vue', 'ConfigGlobal.vue', 'ExportExcel.vue'].every(ele => !id.includes(ele)) &&
getModuleInfo(id).code.length < 10000
) {
return 'vendor'
} }
} }
} }

View File

@ -28,10 +28,10 @@ export const useI18n = (
} => { } => {
const normalFn = { const normalFn = {
t: (key: string) => { t: (key: string) => {
console.log('window.de-i18nDe', key, namespace)
return getKey(namespace, key) return getKey(namespace, key)
} }
} }
console.log('window.de-i18nDe', i18n)
if (!i18n) { if (!i18n) {
return normalFn return normalFn