@umijs/preset-umi 4.6.39 → 4.6.41
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/dist/features/tmpFiles/tmpFiles.js +9 -10
- package/package.json +15 -15
|
@@ -55,7 +55,7 @@ var tmpFiles_default = (api) => {
|
|
|
55
55
|
});
|
|
56
56
|
const TSCONFIG_FILE_NAME = "tsconfig.json";
|
|
57
57
|
api.onGenerateFiles(async (opts) => {
|
|
58
|
-
var _a, _b, _c
|
|
58
|
+
var _a, _b, _c;
|
|
59
59
|
const rendererPath = (0, import_utils.winPath)(
|
|
60
60
|
await api.applyPlugins({
|
|
61
61
|
key: "modifyRendererPath",
|
|
@@ -74,7 +74,7 @@ var tmpFiles_default = (api) => {
|
|
|
74
74
|
const srcPrefix = api.appData.hasSrcDir ? "src/" : "";
|
|
75
75
|
const umiTempDir = `${srcPrefix}.${frameworkName}`;
|
|
76
76
|
const baseUrl = api.appData.hasSrcDir ? "../../" : "../";
|
|
77
|
-
const
|
|
77
|
+
const isGreaterThan5 = api.appData.typescript.tsVersion && import_utils.semver.major(api.appData.typescript.tsVersion) >= 5;
|
|
78
78
|
const isTslibInstalled = !!api.appData.typescript.tslibVersion;
|
|
79
79
|
const tsconfigFilePath = (0, import_path.join)(api.paths.absTmpPath, TSCONFIG_FILE_NAME);
|
|
80
80
|
const relativeUmiDirPath = (0, import_utils.winPath)(
|
|
@@ -87,13 +87,12 @@ var tmpFiles_default = (api) => {
|
|
|
87
87
|
lib: ["dom", "dom.iterable", "esnext"],
|
|
88
88
|
allowJs: true,
|
|
89
89
|
skipLibCheck: true,
|
|
90
|
-
moduleResolution:
|
|
90
|
+
moduleResolution: isGreaterThan5 ? "bundler" : "node",
|
|
91
91
|
importHelpers: isTslibInstalled,
|
|
92
92
|
noEmit: true,
|
|
93
93
|
jsx: api.appData.framework === "vue" ? "preserve" : "react-jsx",
|
|
94
94
|
esModuleInterop: true,
|
|
95
95
|
sourceMap: true,
|
|
96
|
-
baseUrl,
|
|
97
96
|
strict: true,
|
|
98
97
|
resolveJsonModule: true,
|
|
99
98
|
allowSyntheticDefaultImports: true,
|
|
@@ -104,11 +103,11 @@ var tmpFiles_default = (api) => {
|
|
|
104
103
|
isolatedModules: true
|
|
105
104
|
} : {},
|
|
106
105
|
paths: {
|
|
107
|
-
"@/*": [`${srcPrefix}*`],
|
|
108
|
-
"@@/*": [`${umiTempDir}/*`],
|
|
106
|
+
"@/*": [`${baseUrl}${srcPrefix}*`],
|
|
107
|
+
"@@/*": [`${baseUrl}${umiTempDir}/*`],
|
|
109
108
|
[`${api.appData.umi.importSource}`]: [relativeUmiDirPath],
|
|
110
109
|
[`${api.appData.umi.importSource}/typings`]: [
|
|
111
|
-
`${umiTempDir}/typings`
|
|
110
|
+
`${baseUrl}${umiTempDir}/typings`
|
|
112
111
|
],
|
|
113
112
|
...api.config.vite ? {
|
|
114
113
|
"@fs/*": ["*"]
|
|
@@ -303,7 +302,7 @@ declare module '*.txt' {
|
|
|
303
302
|
})
|
|
304
303
|
).join("\n");
|
|
305
304
|
const ssrConfig = api.config.ssr;
|
|
306
|
-
const __INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ((
|
|
305
|
+
const __INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ((_a = api.config.ssr) == null ? void 0 : _a.__INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) ?? {
|
|
307
306
|
pureApp: false,
|
|
308
307
|
pureHtml: false
|
|
309
308
|
};
|
|
@@ -362,7 +361,7 @@ export default function EmptyRoute() {
|
|
|
362
361
|
}
|
|
363
362
|
const hasSrc = api.appData.hasSrcDir;
|
|
364
363
|
const pages = (0, import_path.basename)(
|
|
365
|
-
((
|
|
364
|
+
((_b = api.config.conventionRoutes) == null ? void 0 : _b.base) || api.paths.absPagesPath
|
|
366
365
|
);
|
|
367
366
|
const prefix = hasSrc ? `../../../src/${pages}/` : `../../${pages}/`;
|
|
368
367
|
const clonedRoutes = import_utils.lodash.cloneDeep(routes);
|
|
@@ -420,7 +419,7 @@ if (process.env.NODE_ENV === 'development') {
|
|
|
420
419
|
});
|
|
421
420
|
const plugins = await api.applyPlugins({
|
|
422
421
|
key: "addRuntimePlugin",
|
|
423
|
-
initialValue: [(
|
|
422
|
+
initialValue: [(_c = api.appData.appJS) == null ? void 0 : _c.path].filter(Boolean)
|
|
424
423
|
});
|
|
425
424
|
function checkDuplicatePluginKeys(arr) {
|
|
426
425
|
const duplicates = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/preset-umi",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.41",
|
|
4
4
|
"description": "@umijs/preset-umi",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/preset-umi#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -43,21 +43,21 @@
|
|
|
43
43
|
"react-router": "6.3.0",
|
|
44
44
|
"react-router-dom": "6.3.0",
|
|
45
45
|
"regenerator-runtime": "0.13.11",
|
|
46
|
-
"@umijs/ast": "4.6.
|
|
47
|
-
"@umijs/
|
|
48
|
-
"@umijs/
|
|
49
|
-
"@umijs/bundler-
|
|
50
|
-
"@umijs/bundler-
|
|
51
|
-
"@umijs/bundler-vite": "4.6.
|
|
52
|
-
"@umijs/bundler-webpack": "4.6.
|
|
53
|
-
"@umijs/
|
|
54
|
-
"@umijs/
|
|
55
|
-
"@umijs/
|
|
56
|
-
"@umijs/plugin-run": "4.6.39",
|
|
57
|
-
"@umijs/renderer-react": "4.6.39",
|
|
58
|
-
"@umijs/zod2ts": "4.6.39",
|
|
46
|
+
"@umijs/ast": "4.6.41",
|
|
47
|
+
"@umijs/babel-preset-umi": "4.6.41",
|
|
48
|
+
"@umijs/bundler-esbuild": "4.6.41",
|
|
49
|
+
"@umijs/bundler-utils": "4.6.41",
|
|
50
|
+
"@umijs/bundler-utoopack": "4.6.41",
|
|
51
|
+
"@umijs/bundler-vite": "4.6.41",
|
|
52
|
+
"@umijs/bundler-webpack": "4.6.41",
|
|
53
|
+
"@umijs/plugin-run": "4.6.41",
|
|
54
|
+
"@umijs/renderer-react": "4.6.41",
|
|
55
|
+
"@umijs/core": "4.6.41",
|
|
59
56
|
"@umijs/ui": "3.0.1",
|
|
60
|
-
"@umijs/
|
|
57
|
+
"@umijs/mfsu": "4.6.41",
|
|
58
|
+
"@umijs/server": "4.6.41",
|
|
59
|
+
"@umijs/zod2ts": "4.6.41",
|
|
60
|
+
"@umijs/utils": "4.6.41"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@manypkg/get-packages": "1.1.3",
|