@umijs/bundler-utoopack 4.4.13-canary.20250911.3 → 4.4.13-canary.20250915.1
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 +23 -1
- package/dist/index.js +0 -2
- package/package.json +4 -4
package/dist/config.js
CHANGED
|
@@ -53,7 +53,15 @@ function getModularizeImports(extraBabelPlugins) {
|
|
|
53
53
|
{}
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
+
function getNormalizedAlias(alias) {
|
|
57
|
+
const newAlias = { ...alias };
|
|
58
|
+
if (newAlias.react) {
|
|
59
|
+
newAlias["react/*"] = `${newAlias.react}/*`;
|
|
60
|
+
}
|
|
61
|
+
return newAlias;
|
|
62
|
+
}
|
|
56
63
|
async function getProdUtooPackConfig(opts) {
|
|
64
|
+
var _a;
|
|
57
65
|
const webpackConfig = await (0, import_bundler_webpack.getConfig)({
|
|
58
66
|
cwd: opts.cwd,
|
|
59
67
|
rootDir: opts.rootDir,
|
|
@@ -98,7 +106,14 @@ async function getProdUtooPackConfig(opts) {
|
|
|
98
106
|
...utooBundlerOpts.config.optimization,
|
|
99
107
|
modularizeImports,
|
|
100
108
|
concatenateModules: true,
|
|
101
|
-
minify: false
|
|
109
|
+
minify: false,
|
|
110
|
+
moduleIds: "named"
|
|
111
|
+
},
|
|
112
|
+
resolve: {
|
|
113
|
+
...utooBundlerOpts.config.resolve,
|
|
114
|
+
alias: getNormalizedAlias(
|
|
115
|
+
(_a = utooBundlerOpts.config.resolve) == null ? void 0 : _a.alias
|
|
116
|
+
)
|
|
102
117
|
},
|
|
103
118
|
styles: {
|
|
104
119
|
less: {
|
|
@@ -113,6 +128,7 @@ async function getProdUtooPackConfig(opts) {
|
|
|
113
128
|
return utooBundlerOpts;
|
|
114
129
|
}
|
|
115
130
|
async function getDevUtooPackConfig(opts) {
|
|
131
|
+
var _a;
|
|
116
132
|
let webpackConfig = await (0, import_bundler_webpack.getConfig)({
|
|
117
133
|
cwd: opts.cwd,
|
|
118
134
|
rootDir: opts.rootDir,
|
|
@@ -152,6 +168,12 @@ async function getDevUtooPackConfig(opts) {
|
|
|
152
168
|
...utooBundlerOpts.config.output,
|
|
153
169
|
clean: true
|
|
154
170
|
},
|
|
171
|
+
resolve: {
|
|
172
|
+
...utooBundlerOpts.config.resolve,
|
|
173
|
+
alias: getNormalizedAlias(
|
|
174
|
+
(_a = utooBundlerOpts.config.resolve) == null ? void 0 : _a.alias
|
|
175
|
+
)
|
|
176
|
+
},
|
|
155
177
|
optimization: {
|
|
156
178
|
...utooBundlerOpts.config.optimization,
|
|
157
179
|
modularizeImports
|
package/dist/index.js
CHANGED
|
@@ -49,7 +49,6 @@ async function build(opts) {
|
|
|
49
49
|
var _a;
|
|
50
50
|
const { cwd, onBuildComplete } = opts;
|
|
51
51
|
const utooPackConfig = await (0, import_config.getProdUtooPackConfig)(opts);
|
|
52
|
-
console.log("utooPackConfig: ", JSON.stringify(utooPackConfig, null, 2));
|
|
53
52
|
const rootDir = (0, import_pack.findRootDir)(cwd);
|
|
54
53
|
const { build: utooPackBuild } = require("@utoo/pack");
|
|
55
54
|
try {
|
|
@@ -88,7 +87,6 @@ async function dev(opts) {
|
|
|
88
87
|
throw new Error("opts should be supplied");
|
|
89
88
|
}
|
|
90
89
|
const utooPackConfig = await (0, import_config.getDevUtooPackConfig)(opts);
|
|
91
|
-
console.log("utooPackConfig: ", JSON.stringify(utooPackConfig, null, 2));
|
|
92
90
|
const rootDir = (0, import_pack.findRootDir)(cwd);
|
|
93
91
|
const app = (0, import_express.default)();
|
|
94
92
|
const cors = require("cors");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/bundler-utoopack",
|
|
3
|
-
"version": "4.4.13-canary.
|
|
3
|
+
"version": "4.4.13-canary.20250915.1",
|
|
4
4
|
"description": "@umijs/bundler-utoopack",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@umijs/bundler-utils": "4.4.13-canary.
|
|
12
|
-
"@utoo/pack": "0.0.1-alpha.
|
|
11
|
+
"@umijs/bundler-utils": "4.4.13-canary.20250915.1",
|
|
12
|
+
"@utoo/pack": "0.0.1-alpha.47",
|
|
13
13
|
"compression": "^1.7.4",
|
|
14
14
|
"connect-history-api-fallback": "^2.0.0",
|
|
15
15
|
"cors": "^2.8.5",
|
|
16
16
|
"express": "^4.18.2",
|
|
17
17
|
"express-http-proxy": "^2.1.1",
|
|
18
18
|
"find-up": "5.0.0",
|
|
19
|
-
"@umijs/bundler-webpack": "4.4.13-canary.
|
|
19
|
+
"@umijs/bundler-webpack": "4.4.13-canary.20250915.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"father": "4.1.5"
|