@umijs/bundler-utoopack 4.6.37 → 4.6.39
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/config.js +16 -2
- package/package.json +4 -4
package/dist/config.js
CHANGED
|
@@ -36,6 +36,7 @@ module.exports = __toCommonJS(config_exports);
|
|
|
36
36
|
var import_bundler_webpack = require("@umijs/bundler-webpack");
|
|
37
37
|
var import_utils = require("@umijs/utils");
|
|
38
38
|
var import_pack = require("@utoo/pack");
|
|
39
|
+
var import_fs = __toESM(require("fs"));
|
|
39
40
|
var import_path = require("path");
|
|
40
41
|
function convertProcessEnvForUtoopack(webpackConfig) {
|
|
41
42
|
var _a;
|
|
@@ -103,8 +104,21 @@ function getNormalizedAlias(alias, rootDir) {
|
|
|
103
104
|
if (key.endsWith("/*") || value.endsWith("/*") || key.endsWith("/") || value.endsWith("/") || key.endsWith("$")) {
|
|
104
105
|
continue;
|
|
105
106
|
}
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
const ext = (0, import_path.extname)(value);
|
|
108
|
+
if (ext) {
|
|
109
|
+
let isDirectory = false;
|
|
110
|
+
const candidates = [.../* @__PURE__ */ new Set([value, (0, import_path.resolve)(rootDir, value)])];
|
|
111
|
+
for (const candidate of candidates) {
|
|
112
|
+
try {
|
|
113
|
+
const stat = import_fs.default.statSync(candidate);
|
|
114
|
+
if (stat.isDirectory()) {
|
|
115
|
+
isDirectory = true;
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
} catch (e) {
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (!isDirectory) continue;
|
|
108
122
|
}
|
|
109
123
|
newAlias[`${key}/*`] = `${value}/*`;
|
|
110
124
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-utoopack",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.39",
|
|
4
4
|
"description": "@umijs/bundler-utoopack",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@utoo/pack": "1.3.
|
|
11
|
+
"@utoo/pack": "1.3.8",
|
|
12
12
|
"compression": "^1.7.4",
|
|
13
13
|
"connect-history-api-fallback": "^2.0.0",
|
|
14
14
|
"cors": "^2.8.5",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"postcss": "^8.4.21",
|
|
20
20
|
"sass": "1.54.0",
|
|
21
21
|
"sass-loader": "13.2.0",
|
|
22
|
-
"@umijs/bundler-
|
|
23
|
-
"@umijs/bundler-
|
|
22
|
+
"@umijs/bundler-utils": "4.6.39",
|
|
23
|
+
"@umijs/bundler-webpack": "4.6.39"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"father": "4.1.5"
|