@umijs/bundler-utoopack 4.4.13-canary.20250911.1 → 4.4.13-canary.20250912.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.
Files changed (2) hide show
  1. package/dist/config.js +24 -3
  2. package/package.json +3 -3
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,
@@ -97,9 +105,15 @@ async function getProdUtooPackConfig(opts) {
97
105
  optimization: {
98
106
  ...utooBundlerOpts.config.optimization,
99
107
  modularizeImports,
100
- concatenateModules: true
101
- // minify: false,
102
- // moduleIds: 'named'
108
+ concatenateModules: true,
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
+ )
103
117
  },
104
118
  styles: {
105
119
  less: {
@@ -114,6 +128,7 @@ async function getProdUtooPackConfig(opts) {
114
128
  return utooBundlerOpts;
115
129
  }
116
130
  async function getDevUtooPackConfig(opts) {
131
+ var _a;
117
132
  let webpackConfig = await (0, import_bundler_webpack.getConfig)({
118
133
  cwd: opts.cwd,
119
134
  rootDir: opts.rootDir,
@@ -153,6 +168,12 @@ async function getDevUtooPackConfig(opts) {
153
168
  ...utooBundlerOpts.config.output,
154
169
  clean: true
155
170
  },
171
+ resolve: {
172
+ ...utooBundlerOpts.config.resolve,
173
+ alias: getNormalizedAlias(
174
+ (_a = utooBundlerOpts.config.resolve) == null ? void 0 : _a.alias
175
+ )
176
+ },
156
177
  optimization: {
157
178
  ...utooBundlerOpts.config.optimization,
158
179
  modularizeImports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-utoopack",
3
- "version": "4.4.13-canary.20250911.1",
3
+ "version": "4.4.13-canary.20250912.1",
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
- "@umijs/bundler-utils": "4.4.13-canary.20250911.1",
11
+ "@umijs/bundler-utils": "4.4.13-canary.20250912.1",
12
12
  "@utoo/pack": "0.0.1-alpha.46",
13
13
  "compression": "^1.7.4",
14
14
  "connect-history-api-fallback": "^2.0.0",
@@ -16,7 +16,7 @@
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.20250911.1"
19
+ "@umijs/bundler-webpack": "4.4.13-canary.20250912.1"
20
20
  },
21
21
  "devDependencies": {
22
22
  "father": "4.1.5"