@umijs/preset-umi 4.6.31 → 4.6.33
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/appData/appData.js +26 -2
- package/package.json +15 -15
|
@@ -174,9 +174,32 @@ var appData_default = (api) => {
|
|
|
174
174
|
}
|
|
175
175
|
function getGlobalFiles() {
|
|
176
176
|
const absSrcPath = api.paths.absSrcPath;
|
|
177
|
+
const getActualFilePath = (filePath) => {
|
|
178
|
+
const dir = (0, import_path.dirname)(filePath);
|
|
179
|
+
const base = (0, import_path.basename)(filePath);
|
|
180
|
+
if (!(0, import_fs.existsSync)(dir)) {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
try {
|
|
184
|
+
const files = (0, import_fs.readdirSync)(dir);
|
|
185
|
+
const lowerBase = base.toLowerCase();
|
|
186
|
+
const matchedFile = files.find((file) => {
|
|
187
|
+
return file.toLowerCase() === lowerBase;
|
|
188
|
+
});
|
|
189
|
+
if (matchedFile) {
|
|
190
|
+
const fullPath = (0, import_path.join)(dir, matchedFile);
|
|
191
|
+
if ((0, import_fs.statSync)(fullPath).isFile()) {
|
|
192
|
+
return fullPath;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
} catch {
|
|
196
|
+
}
|
|
197
|
+
return null;
|
|
198
|
+
};
|
|
177
199
|
const existsAndPushFile = (memo, file) => {
|
|
178
200
|
if ((0, import_fs.existsSync)(file)) {
|
|
179
|
-
|
|
201
|
+
const actualPath = getActualFilePath(file);
|
|
202
|
+
memo.push(actualPath || file);
|
|
180
203
|
}
|
|
181
204
|
return memo;
|
|
182
205
|
};
|
|
@@ -188,7 +211,8 @@ var appData_default = (api) => {
|
|
|
188
211
|
const loadingFile = (0, import_watch.expandJSPaths)((0, import_path.join)(absSrcPath, "loading")).find(
|
|
189
212
|
import_fs.existsSync
|
|
190
213
|
);
|
|
191
|
-
const
|
|
214
|
+
const loadingFileFixed = loadingFile ? getActualFilePath(loadingFile) || loadingFile : void 0;
|
|
215
|
+
const globalLoading = loadingFileFixed ? (0, import_utils.winPath)(loadingFileFixed) : void 0;
|
|
192
216
|
const overridesCSS = [(0, import_overrides.getOverridesCSS)(api.paths.absSrcPath)].filter(
|
|
193
217
|
Boolean
|
|
194
218
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/preset-umi",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.33",
|
|
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/
|
|
47
|
-
"@umijs/
|
|
48
|
-
"@umijs/
|
|
49
|
-
"@umijs/bundler-
|
|
50
|
-
"@umijs/bundler-
|
|
51
|
-
"@umijs/bundler-
|
|
52
|
-
"@umijs/core": "4.6.
|
|
53
|
-
"@umijs/
|
|
54
|
-
"@umijs/
|
|
46
|
+
"@umijs/ast": "4.6.33",
|
|
47
|
+
"@umijs/babel-preset-umi": "4.6.33",
|
|
48
|
+
"@umijs/bundler-utils": "4.6.33",
|
|
49
|
+
"@umijs/bundler-esbuild": "4.6.33",
|
|
50
|
+
"@umijs/bundler-vite": "4.6.33",
|
|
51
|
+
"@umijs/bundler-webpack": "4.6.33",
|
|
52
|
+
"@umijs/core": "4.6.33",
|
|
53
|
+
"@umijs/mfsu": "4.6.33",
|
|
54
|
+
"@umijs/plugin-run": "4.6.33",
|
|
55
|
+
"@umijs/renderer-react": "4.6.33",
|
|
56
|
+
"@umijs/bundler-utoopack": "4.6.33",
|
|
57
|
+
"@umijs/server": "4.6.33",
|
|
55
58
|
"@umijs/ui": "3.0.1",
|
|
56
|
-
"@umijs/
|
|
57
|
-
"@umijs/
|
|
58
|
-
"@umijs/server": "4.6.31",
|
|
59
|
-
"@umijs/zod2ts": "4.6.31",
|
|
60
|
-
"@umijs/utils": "4.6.31"
|
|
59
|
+
"@umijs/utils": "4.6.33",
|
|
60
|
+
"@umijs/zod2ts": "4.6.33"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@manypkg/get-packages": "1.1.3",
|