@go-wind/admin-vben 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-wind/admin-vben",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Vben 5 derived admin shell framework (Vue 3 + Ant Design Vue + tailwind), deep-customized and version-pinned by go-wind-admin. Consumed as a SOURCE package: hosts resolve subpaths into src/ via their own tsconfig paths / bundler, keeping full component types without a build step.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,7 +19,28 @@ const i18n = createI18n({
19
19
  messages: {},
20
20
  });
21
21
 
22
- const modules = import.meta.glob('./langs/**/*.json');
22
+ // 语言包静态枚举:源码形态包位于 node_modules 内,vite 的 import.meta.glob 插件
23
+ // 不展开 node_modules 路径下的文件(localesMap 会得到空集、框架文案全 raw),
24
+ // 故以静态 import 等价替换 glob(loadLocalesMapFromDir 只要求「路径键 → 懒加载」形状)。
25
+ import authenticationEn from './langs/en-US/authentication.json';
26
+ import authenticationZh from './langs/zh-CN/authentication.json';
27
+ import commonEn from './langs/en-US/common.json';
28
+ import commonZh from './langs/zh-CN/common.json';
29
+ import preferencesEn from './langs/en-US/preferences.json';
30
+ import preferencesZh from './langs/zh-CN/preferences.json';
31
+ import uiEn from './langs/en-US/ui.json';
32
+ import uiZh from './langs/zh-CN/ui.json';
33
+
34
+ const modules: Record<string, () => Promise<{ default: unknown }>> = {
35
+ './langs/en-US/authentication.json': async () => ({ default: authenticationEn }),
36
+ './langs/zh-CN/authentication.json': async () => ({ default: authenticationZh }),
37
+ './langs/en-US/common.json': async () => ({ default: commonEn }),
38
+ './langs/zh-CN/common.json': async () => ({ default: commonZh }),
39
+ './langs/en-US/preferences.json': async () => ({ default: preferencesEn }),
40
+ './langs/zh-CN/preferences.json': async () => ({ default: preferencesZh }),
41
+ './langs/en-US/ui.json': async () => ({ default: uiEn }),
42
+ './langs/zh-CN/ui.json': async () => ({ default: uiZh }),
43
+ };
23
44
 
24
45
  const { setSimpleLocale } = useSimpleLocale();
25
46