@umijs/bundler-webpack 4.0.0-canary.20220727.1 → 4.0.0-canary.20220729.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 (51) hide show
  1. package/client/client/client.js +311 -190
  2. package/client/constants.js +1 -1
  3. package/client/utils/formatWebpackMessages.js +1 -1
  4. package/dist/build.js +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/config/_sampleFeature.js +1 -1
  7. package/dist/config/assetRules.js +1 -1
  8. package/dist/config/bundleAnalyzerPlugin.js +1 -1
  9. package/dist/config/compressPlugin.js +1 -1
  10. package/dist/config/config.js +1 -1
  11. package/dist/config/copyPlugin.js +1 -1
  12. package/dist/config/cssRules.js +1 -1
  13. package/dist/config/definePlugin.js +1 -1
  14. package/dist/config/detectDeadCode.js +1 -1
  15. package/dist/config/detectDeadCodePlugin.js +1 -1
  16. package/dist/config/fastRefreshPlugin.js +1 -1
  17. package/dist/config/forkTSCheckerPlugin.js +1 -1
  18. package/dist/config/harmonyLinkingErrorPlugin.js +1 -1
  19. package/dist/config/ignorePlugin.js +1 -1
  20. package/dist/config/javaScriptRules.js +1 -1
  21. package/dist/config/manifestPlugin.js +1 -1
  22. package/dist/config/miniCSSExtractPlugin.js +1 -1
  23. package/dist/config/nodePolyfill.js +1 -1
  24. package/dist/config/nodePrefixPlugin.js +1 -1
  25. package/dist/config/progressPlugin.js +1 -1
  26. package/dist/config/purgecssWebpackPlugin.js +1 -1
  27. package/dist/config/speedMeasureWebpackPlugin.js +1 -1
  28. package/dist/config/ssrPlugin.js +1 -1
  29. package/dist/config/svgRules.js +1 -1
  30. package/dist/constants.js +1 -1
  31. package/dist/dev.js +10 -6
  32. package/dist/index.js +1 -1
  33. package/dist/loader/svgr.js +1 -1
  34. package/dist/loader/swc.js +1 -1
  35. package/dist/parcelCSS.js +1 -1
  36. package/dist/plugins/ProgressPlugin.js +1 -1
  37. package/dist/plugins/RuntimePublicPathPlugin.js +1 -1
  38. package/dist/plugins/_SamplePlugin.js +1 -1
  39. package/dist/requireHook.js +1 -1
  40. package/dist/schema.js +4 -1
  41. package/dist/server/server.js +1 -1
  42. package/dist/server/ws.js +1 -1
  43. package/dist/swcPlugins/autoCSSModules.js +1 -1
  44. package/dist/swcPlugins/changeImportFromString.js +1 -1
  45. package/dist/swcPlugins/lockCoreJS.js +1 -1
  46. package/dist/types.js +1 -1
  47. package/dist/utils/browsersList.js +1 -1
  48. package/dist/utils/depMatch.js +1 -1
  49. package/dist/utils/formatWebpackMessages.js +1 -1
  50. package/dist/utils/getEsBuildTarget.js +1 -1
  51. package/package.json +5 -5
@@ -1,210 +1,331 @@
1
- var __getOwnPropNames = Object.getOwnPropertyNames;
2
- var __commonJS = (cb, mod) => function __require() {
3
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
- };
5
- var __async = (__this, __arguments, generator) => {
6
- return new Promise((resolve, reject) => {
7
- var fulfilled = (value) => {
8
- try {
9
- step(generator.next(value));
10
- } catch (e) {
11
- reject(e);
12
- }
13
- };
14
- var rejected = (value) => {
15
- try {
16
- step(generator.throw(value));
17
- } catch (e) {
18
- reject(e);
19
- }
20
- };
21
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
22
- step((generator = generator.apply(__this, __arguments)).next());
23
- });
24
- };
1
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
2
+
3
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
25
4
 
26
- // client.ts
27
- import stripAnsi from "@umijs/utils/compiled/strip-ansi";
28
- import * as ErrorOverlay from "react-error-overlay";
5
+ import stripAnsi from '@umijs/utils/compiled/strip-ansi'; // @ts-ignore
6
+
7
+ import * as ErrorOverlay from 'react-error-overlay';
29
8
  import { MESSAGE_TYPE } from "../constants";
30
9
  import { formatWebpackMessages } from "../utils/formatWebpackMessages";
31
- var require_client = __commonJS({
32
- "client.ts"(exports, module) {
33
- console.log("[webpack] connecting...");
34
- function getHost() {
35
- if (process.env.SOCKET_SERVER) {
36
- return new URL(process.env.SOCKET_SERVER);
37
- }
38
- return location;
39
- }
40
- function getSocketUrl() {
41
- let h = getHost();
42
- const host = h.host;
43
- const isHttps = h.protocol === "https:";
44
- return `${isHttps ? "wss" : "ws"}://${host}`;
45
- }
46
- function getPingUrl() {
47
- const h = getHost();
48
- return `${h.protocol}//${h.host}/__umi_ping`;
49
- }
50
- var pingTimer = null;
51
- var isFirstCompilation = true;
52
- var mostRecentCompilationHash = null;
53
- var hasCompileErrors = false;
54
- var hadRuntimeError = false;
55
- var pingUrl = getPingUrl();
56
- var socket = new WebSocket(getSocketUrl(), "webpack-hmr");
57
- socket.addEventListener("message", (_0) => __async(exports, [_0], function* ({ data }) {
58
- data = JSON.parse(data);
59
- if (data.type === "connected") {
60
- console.log(`[webpack] connected.`);
61
- pingTimer = setInterval(() => socket.send("ping"), 3e4);
62
- } else {
63
- handleMessage(data).catch(console.error);
64
- }
65
- }));
66
- function waitForSuccessfulPing(ms = 1e3) {
67
- return __async(this, null, function* () {
68
- while (true) {
69
- try {
70
- yield fetch(pingUrl);
71
- break;
72
- } catch (e) {
73
- yield new Promise((resolve) => setTimeout(resolve, ms));
74
- }
10
+ console.log('[webpack] connecting...');
11
+
12
+ function getHost() {
13
+ if (process.env.SOCKET_SERVER) {
14
+ return new URL(process.env.SOCKET_SERVER);
15
+ }
16
+
17
+ return location;
18
+ }
19
+
20
+ function getSocketUrl() {
21
+ var h = getHost();
22
+ var host = h.host;
23
+ var isHttps = h.protocol === 'https:';
24
+ return "".concat(isHttps ? 'wss' : 'ws', "://").concat(host);
25
+ }
26
+
27
+ function getPingUrl() {
28
+ var h = getHost();
29
+ return "".concat(h.protocol, "//").concat(h.host, "/__umi_ping");
30
+ }
31
+
32
+ var pingTimer = null;
33
+ var isFirstCompilation = true;
34
+ var mostRecentCompilationHash = null;
35
+ var hasCompileErrors = false;
36
+ var hadRuntimeError = false;
37
+ var pingUrl = getPingUrl();
38
+ var socket = new WebSocket(getSocketUrl(), 'webpack-hmr');
39
+ socket.addEventListener('message', /*#__PURE__*/function () {
40
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref) {
41
+ var data;
42
+ return regeneratorRuntime.wrap(function _callee$(_context) {
43
+ while (1) {
44
+ switch (_context.prev = _context.next) {
45
+ case 0:
46
+ data = _ref.data;
47
+ data = JSON.parse(data);
48
+
49
+ if (data.type === 'connected') {
50
+ console.log("[webpack] connected."); // proxy(nginx, docker) hmr ws maybe caused timeout,
51
+ // so send ping package let ws keep alive.
52
+
53
+ pingTimer = setInterval(function () {
54
+ return socket.send('ping');
55
+ }, 30000);
56
+ } else {
57
+ handleMessage(data).catch(console.error);
58
+ }
59
+
60
+ case 3:
61
+ case "end":
62
+ return _context.stop();
75
63
  }
76
- });
77
- }
78
- socket.addEventListener("close", () => __async(exports, null, function* () {
79
- if (pingTimer)
80
- clearInterval(pingTimer);
81
- console.info("[webpack] Dev server disconnected. Polling for restart...");
82
- yield waitForSuccessfulPing();
83
- location.reload();
84
- }));
85
- ErrorOverlay.startReportingRuntimeErrors({
86
- onError: function() {
87
- hadRuntimeError = true;
88
- },
89
- filename: "/static/js/bundle.js"
90
- });
91
- if (module.hot && typeof module.hot.dispose === "function") {
92
- module.hot.dispose(function() {
93
- ErrorOverlay.stopReportingRuntimeErrors();
94
- });
95
- }
96
- function handleAvailableHash(hash) {
97
- mostRecentCompilationHash = hash;
98
- }
99
- function handleSuccess() {
100
- const isHotUpdate = !isFirstCompilation;
101
- isFirstCompilation = false;
102
- hasCompileErrors = false;
103
- if (isHotUpdate) {
104
- tryApplyUpdates(function onHotUpdateSuccess() {
105
- tryDismissErrorOverlay();
106
- });
107
64
  }
108
- }
109
- function handleWarnings(warnings) {
110
- const isHotUpdate = !isFirstCompilation;
111
- isFirstCompilation = false;
112
- hasCompileErrors = false;
113
- const formatted = formatWebpackMessages({
114
- warnings,
115
- errors: []
116
- });
117
- if (typeof console !== "undefined" && typeof console.warn === "function") {
118
- for (let i = 0; i < formatted.warnings.length; i++) {
119
- if (i === 5) {
120
- console.warn("There were more warnings in other files.\nYou can find a complete log in the terminal.");
65
+ }, _callee);
66
+ }));
67
+
68
+ return function (_x) {
69
+ return _ref2.apply(this, arguments);
70
+ };
71
+ }());
72
+
73
+ function waitForSuccessfulPing() {
74
+ return _waitForSuccessfulPing.apply(this, arguments);
75
+ }
76
+
77
+ function _waitForSuccessfulPing() {
78
+ _waitForSuccessfulPing = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
79
+ var ms,
80
+ _args3 = arguments;
81
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
82
+ while (1) {
83
+ switch (_context3.prev = _context3.next) {
84
+ case 0:
85
+ ms = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : 1000;
86
+
87
+ case 1:
88
+ if (!true) {
89
+ _context3.next = 14;
90
+ break;
91
+ }
92
+
93
+ _context3.prev = 2;
94
+ _context3.next = 5;
95
+ return fetch(pingUrl);
96
+
97
+ case 5:
98
+ return _context3.abrupt("break", 14);
99
+
100
+ case 8:
101
+ _context3.prev = 8;
102
+ _context3.t0 = _context3["catch"](2);
103
+ _context3.next = 12;
104
+ return new Promise(function (resolve) {
105
+ return setTimeout(resolve, ms);
106
+ });
107
+
108
+ case 12:
109
+ _context3.next = 1;
121
110
  break;
122
- }
123
- console.warn(stripAnsi(formatted.warnings[i]));
111
+
112
+ case 14:
113
+ case "end":
114
+ return _context3.stop();
124
115
  }
125
116
  }
126
- if (isHotUpdate) {
127
- tryApplyUpdates(function onSuccessfulHotUpdate() {
128
- tryDismissErrorOverlay();
129
- });
130
- }
131
- }
132
- function handleErrors(errors) {
133
- isFirstCompilation = false;
134
- hasCompileErrors = true;
135
- const formatted = formatWebpackMessages({
136
- warnings: [],
137
- errors
138
- });
139
- ErrorOverlay.reportBuildError(formatted.errors[0]);
140
- if (typeof console !== "undefined" && typeof console.error === "function") {
141
- for (let i = 0; i < formatted.errors.length; i++) {
142
- console.error(stripAnsi(formatted.errors[i]));
143
- }
117
+ }, _callee3, null, [[2, 8]]);
118
+ }));
119
+ return _waitForSuccessfulPing.apply(this, arguments);
120
+ }
121
+
122
+ socket.addEventListener('close', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
123
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
124
+ while (1) {
125
+ switch (_context2.prev = _context2.next) {
126
+ case 0:
127
+ if (pingTimer) clearInterval(pingTimer);
128
+ console.info('[webpack] Dev server disconnected. Polling for restart...');
129
+ _context2.next = 4;
130
+ return waitForSuccessfulPing();
131
+
132
+ case 4:
133
+ location.reload();
134
+
135
+ case 5:
136
+ case "end":
137
+ return _context2.stop();
144
138
  }
145
139
  }
146
- function tryDismissErrorOverlay() {
147
- if (!hasCompileErrors) {
148
- ErrorOverlay.dismissBuildError();
140
+ }, _callee2);
141
+ })));
142
+ ErrorOverlay.startReportingRuntimeErrors({
143
+ onError: function onError() {
144
+ hadRuntimeError = true;
145
+ },
146
+ filename: '/static/js/bundle.js'
147
+ }); // @ts-ignore
148
+
149
+ if (module.hot && typeof module.hot.dispose === 'function') {
150
+ // @ts-ignore
151
+ module.hot.dispose(function () {
152
+ // TODO: why do we need this?
153
+ ErrorOverlay.stopReportingRuntimeErrors();
154
+ });
155
+ } // There is a newer version of the code available.
156
+
157
+
158
+ function handleAvailableHash(hash) {
159
+ // Update last known compilation hash.
160
+ mostRecentCompilationHash = hash;
161
+ }
162
+
163
+ function handleSuccess() {
164
+ var isHotUpdate = !isFirstCompilation;
165
+ isFirstCompilation = false;
166
+ hasCompileErrors = false; // Attempt to apply hot updates or reload.
167
+
168
+ if (isHotUpdate) {
169
+ tryApplyUpdates(function onHotUpdateSuccess() {
170
+ // Only dismiss it when we're sure it's a hot update.
171
+ // Otherwise it would flicker right before the reload.
172
+ tryDismissErrorOverlay();
173
+ });
174
+ }
175
+ }
176
+
177
+ function handleWarnings(warnings) {
178
+ var isHotUpdate = !isFirstCompilation;
179
+ isFirstCompilation = false;
180
+ hasCompileErrors = false;
181
+ var formatted = formatWebpackMessages({
182
+ warnings: warnings,
183
+ errors: []
184
+ }); // print warnings
185
+
186
+ if (typeof console !== 'undefined' && typeof console.warn === 'function') {
187
+ for (var i = 0; i < formatted.warnings.length; i++) {
188
+ if (i === 5) {
189
+ console.warn('There were more warnings in other files.\n' + 'You can find a complete log in the terminal.');
190
+ break;
149
191
  }
192
+
193
+ console.warn(stripAnsi(formatted.warnings[i]));
150
194
  }
151
- function isUpdateAvailable() {
152
- return mostRecentCompilationHash !== __webpack_hash__;
153
- }
154
- function canApplyUpdates() {
155
- return module.hot.status() === "idle";
195
+ } // Attempt to apply hot updates or reload.
196
+
197
+
198
+ if (isHotUpdate) {
199
+ tryApplyUpdates(function onSuccessfulHotUpdate() {
200
+ // Only dismiss it when we're sure it's a hot update.
201
+ // Otherwise it would flicker right before the reload.
202
+ tryDismissErrorOverlay();
203
+ });
204
+ }
205
+ }
206
+
207
+ function handleErrors(errors) {
208
+ isFirstCompilation = false;
209
+ hasCompileErrors = true;
210
+ var formatted = formatWebpackMessages({
211
+ warnings: [],
212
+ errors: errors
213
+ }); // Only show the first error.
214
+
215
+ ErrorOverlay.reportBuildError(formatted.errors[0]); // Also log them to the console.
216
+
217
+ if (typeof console !== 'undefined' && typeof console.error === 'function') {
218
+ for (var i = 0; i < formatted.errors.length; i++) {
219
+ console.error(stripAnsi(formatted.errors[i]));
156
220
  }
157
- function canAcceptErrors() {
158
- const hasReactRefresh = process.env.FAST_REFRESH;
159
- const status = module.hot.status();
160
- return hasReactRefresh && ["abort", "fail"].indexOf(status) === -1;
221
+ }
222
+ }
223
+
224
+ function tryDismissErrorOverlay() {
225
+ if (!hasCompileErrors) {
226
+ ErrorOverlay.dismissBuildError();
227
+ }
228
+ } // Is there a newer version of this code available?
229
+
230
+
231
+ function isUpdateAvailable() {
232
+ // @ts-ignore
233
+ return mostRecentCompilationHash !== __webpack_hash__;
234
+ }
235
+
236
+ function canApplyUpdates() {
237
+ // @ts-ignore
238
+ return module.hot.status() === 'idle';
239
+ }
240
+
241
+ function canAcceptErrors() {
242
+ // NOTE: This var is injected by Webpack's DefinePlugin, and is a boolean instead of string.
243
+ var hasReactRefresh = process.env.FAST_REFRESH; // @ts-ignore
244
+
245
+ var status = module.hot.status(); // React refresh can handle hot-reloading over errors.
246
+ // However, when hot-reload status is abort or fail,
247
+ // it indicates the current update cannot be applied safely,
248
+ // and thus we should bail out to a forced reload for consistency.
249
+
250
+ return hasReactRefresh && ['abort', 'fail'].indexOf(status) === -1;
251
+ }
252
+
253
+ function tryApplyUpdates(onHotUpdateSuccess) {
254
+ // @ts-ignore
255
+ if (!module.hot) {
256
+ window.location.reload();
257
+ return;
258
+ }
259
+
260
+ if (!isUpdateAvailable() || !canApplyUpdates()) {
261
+ return;
262
+ }
263
+
264
+ function handleApplyUpdates(err, updatedModules) {
265
+ var haveErrors = err || hadRuntimeError; // When there is no error but updatedModules is unavailable,
266
+ // it indicates a critical failure in hot-reloading,
267
+ // e.g. server is not ready to serve new bundle,
268
+ // and hence we need to do a forced reload.
269
+
270
+ var needsForcedReload = !err && !updatedModules;
271
+
272
+ if (haveErrors && !canAcceptErrors() || needsForcedReload) {
273
+ window.location.reload();
161
274
  }
162
- function tryApplyUpdates(onHotUpdateSuccess) {
163
- if (!module.hot) {
164
- window.location.reload();
165
- return;
166
- }
167
- if (!isUpdateAvailable() || !canApplyUpdates()) {
168
- return;
169
- }
170
- function handleApplyUpdates(err, updatedModules) {
171
- const haveErrors = err || hadRuntimeError;
172
- const needsForcedReload = !err && !updatedModules;
173
- if (haveErrors && !canAcceptErrors() || needsForcedReload) {
174
- window.location.reload();
175
- }
176
- if (onHotUpdateSuccess)
177
- onHotUpdateSuccess();
178
- if (isUpdateAvailable()) {
179
- tryApplyUpdates();
180
- }
181
- }
182
- module.hot.check(true).then((updatedModules) => {
183
- handleApplyUpdates(null, updatedModules);
184
- }).catch((err) => {
185
- handleApplyUpdates(err, null);
186
- });
275
+
276
+ if (onHotUpdateSuccess) onHotUpdateSuccess(); // While we were updating, there was a new update! Do it again.
277
+
278
+ if (isUpdateAvailable()) {
279
+ tryApplyUpdates();
187
280
  }
188
- function handleMessage(payload) {
189
- return __async(this, null, function* () {
190
- switch (payload.type) {
191
- case MESSAGE_TYPE.hash:
192
- handleAvailableHash(payload.data);
281
+ } // @ts-ignore
282
+
283
+
284
+ module.hot.check(
285
+ /* autoApply */
286
+ true).then(function (updatedModules) {
287
+ handleApplyUpdates(null, updatedModules);
288
+ }).catch(function (err) {
289
+ handleApplyUpdates(err, null);
290
+ });
291
+ }
292
+
293
+ function handleMessage(_x2) {
294
+ return _handleMessage.apply(this, arguments);
295
+ }
296
+
297
+ function _handleMessage() {
298
+ _handleMessage = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(payload) {
299
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
300
+ while (1) {
301
+ switch (_context4.prev = _context4.next) {
302
+ case 0:
303
+ _context4.t0 = payload.type;
304
+ _context4.next = _context4.t0 === MESSAGE_TYPE.hash ? 3 : _context4.t0 === MESSAGE_TYPE.stillOk ? 5 : _context4.t0 === MESSAGE_TYPE.ok ? 5 : _context4.t0 === MESSAGE_TYPE.errors ? 7 : _context4.t0 === MESSAGE_TYPE.warnings ? 9 : 11;
193
305
  break;
194
- case MESSAGE_TYPE.stillOk:
195
- case MESSAGE_TYPE.ok:
306
+
307
+ case 3:
308
+ handleAvailableHash(payload.data);
309
+ return _context4.abrupt("break", 11);
310
+
311
+ case 5:
196
312
  handleSuccess();
197
- break;
198
- case MESSAGE_TYPE.errors:
313
+ return _context4.abrupt("break", 11);
314
+
315
+ case 7:
199
316
  handleErrors(payload.data);
200
- break;
201
- case MESSAGE_TYPE.warnings:
317
+ return _context4.abrupt("break", 11);
318
+
319
+ case 9:
202
320
  handleWarnings(payload.data);
203
- break;
204
- default:
321
+ return _context4.abrupt("break", 11);
322
+
323
+ case 11:
324
+ case "end":
325
+ return _context4.stop();
205
326
  }
206
- });
207
- }
208
- }
209
- });
210
- export default require_client();
327
+ }
328
+ }, _callee4);
329
+ }));
330
+ return _handleMessage.apply(this, arguments);
331
+ }
@@ -1,4 +1,4 @@
1
- // constants.ts
1
+ // src/constants.ts
2
2
  var DEFAULT_DEVTOOL = "cheap-module-source-map";
3
3
  var DEFAULT_OUTPUT_PATH = "dist";
4
4
  var MFSU_NAME = "MFSU";
@@ -1,4 +1,4 @@
1
- // formatWebpackMessages.ts
1
+ // src/utils/formatWebpackMessages.ts
2
2
  import stripAnsi from "@umijs/utils/compiled/strip-ansi";
3
3
  var friendlySyntaxErrorLabel = "Syntax error:";
4
4
  function isLikelyASyntaxError(message) {
package/dist/build.js CHANGED
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
36
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // build.ts
39
+ // src/build.ts
40
40
  var build_exports = {};
41
41
  __export(build_exports, {
42
42
  build: () => build
package/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ var __copyProps = (to, from, except, desc) => {
14
14
  };
15
15
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
16
16
 
17
- // cli.ts
17
+ // src/cli.ts
18
18
  var import_esbuild = __toESM(require("@umijs/bundler-utils/compiled/esbuild"));
19
19
  var import_utils = require("@umijs/utils");
20
20
  var import_assert = __toESM(require("assert"));
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // _sampleFeature.ts
19
+ // src/config/_sampleFeature.ts
20
20
  var sampleFeature_exports = {};
21
21
  __export(sampleFeature_exports, {
22
22
  addSampleFeature: () => addSampleFeature
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // assetRules.ts
19
+ // src/config/assetRules.ts
20
20
  var assetRules_exports = {};
21
21
  __export(assetRules_exports, {
22
22
  addAssetRules: () => addAssetRules
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // bundleAnalyzerPlugin.ts
19
+ // src/config/bundleAnalyzerPlugin.ts
20
20
  var bundleAnalyzerPlugin_exports = {};
21
21
  __export(bundleAnalyzerPlugin_exports, {
22
22
  addBundleAnalyzerPlugin: () => addBundleAnalyzerPlugin
@@ -33,7 +33,7 @@ var __copyProps = (to, from, except, desc) => {
33
33
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // compressPlugin.ts
36
+ // src/config/compressPlugin.ts
37
37
  var compressPlugin_exports = {};
38
38
  __export(compressPlugin_exports, {
39
39
  addCompressPlugin: () => addCompressPlugin
@@ -33,7 +33,7 @@ var __copyProps = (to, from, except, desc) => {
33
33
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // config.ts
36
+ // src/config/config.ts
37
37
  var config_exports = {};
38
38
  __export(config_exports, {
39
39
  getConfig: () => getConfig
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // copyPlugin.ts
19
+ // src/config/copyPlugin.ts
20
20
  var copyPlugin_exports = {};
21
21
  __export(copyPlugin_exports, {
22
22
  addCopyPlugin: () => addCopyPlugin
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
36
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // cssRules.ts
39
+ // src/config/cssRules.ts
40
40
  var cssRules_exports = {};
41
41
  __export(cssRules_exports, {
42
42
  addCSSRules: () => addCSSRules
@@ -30,7 +30,7 @@ var __copyProps = (to, from, except, desc) => {
30
30
  };
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
- // definePlugin.ts
33
+ // src/config/definePlugin.ts
34
34
  var definePlugin_exports = {};
35
35
  __export(definePlugin_exports, {
36
36
  addDefinePlugin: () => addDefinePlugin,
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // detectDeadCode.ts
22
+ // src/config/detectDeadCode.ts
23
23
  var detectDeadCode_exports = {};
24
24
  __export(detectDeadCode_exports, {
25
25
  default: () => detectDeadCode_default,
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
36
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // detectDeadCodePlugin.ts
39
+ // src/config/detectDeadCodePlugin.ts
40
40
  var detectDeadCodePlugin_exports = {};
41
41
  __export(detectDeadCodePlugin_exports, {
42
42
  addDetectDeadCodePlugin: () => addDetectDeadCodePlugin
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // fastRefreshPlugin.ts
22
+ // src/config/fastRefreshPlugin.ts
23
23
  var fastRefreshPlugin_exports = {};
24
24
  __export(fastRefreshPlugin_exports, {
25
25
  addFastRefreshPlugin: () => addFastRefreshPlugin
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // forkTSCheckerPlugin.ts
22
+ // src/config/forkTSCheckerPlugin.ts
23
23
  var forkTSCheckerPlugin_exports = {};
24
24
  __export(forkTSCheckerPlugin_exports, {
25
25
  addForkTSCheckerPlugin: () => addForkTSCheckerPlugin
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // harmonyLinkingErrorPlugin.ts
19
+ // src/config/harmonyLinkingErrorPlugin.ts
20
20
  var harmonyLinkingErrorPlugin_exports = {};
21
21
  __export(harmonyLinkingErrorPlugin_exports, {
22
22
  addHarmonyLinkingErrorPlugin: () => addHarmonyLinkingErrorPlugin
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // ignorePlugin.ts
19
+ // src/config/ignorePlugin.ts
20
20
  var ignorePlugin_exports = {};
21
21
  __export(ignorePlugin_exports, {
22
22
  addIgnorePlugin: () => addIgnorePlugin
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // javaScriptRules.ts
22
+ // src/config/javaScriptRules.ts
23
23
  var javaScriptRules_exports = {};
24
24
  __export(javaScriptRules_exports, {
25
25
  addJavaScriptRules: () => addJavaScriptRules
@@ -30,7 +30,7 @@ var __copyProps = (to, from, except, desc) => {
30
30
  };
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
- // manifestPlugin.ts
33
+ // src/config/manifestPlugin.ts
34
34
  var manifestPlugin_exports = {};
35
35
  __export(manifestPlugin_exports, {
36
36
  addManifestPlugin: () => addManifestPlugin
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // miniCSSExtractPlugin.ts
22
+ // src/config/miniCSSExtractPlugin.ts
23
23
  var miniCSSExtractPlugin_exports = {};
24
24
  __export(miniCSSExtractPlugin_exports, {
25
25
  addMiniCSSExtractPlugin: () => addMiniCSSExtractPlugin
@@ -33,7 +33,7 @@ var __copyProps = (to, from, except, desc) => {
33
33
  };
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // nodePolyfill.ts
36
+ // src/config/nodePolyfill.ts
37
37
  var nodePolyfill_exports = {};
38
38
  __export(nodePolyfill_exports, {
39
39
  addNodePolyfill: () => addNodePolyfill
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // nodePrefixPlugin.ts
19
+ // src/config/nodePrefixPlugin.ts
20
20
  var nodePrefixPlugin_exports = {};
21
21
  __export(nodePrefixPlugin_exports, {
22
22
  addNodePrefixPlugin: () => addNodePrefixPlugin
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // progressPlugin.ts
22
+ // src/config/progressPlugin.ts
23
23
  var progressPlugin_exports = {};
24
24
  __export(progressPlugin_exports, {
25
25
  addProgressPlugin: () => addProgressPlugin
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // purgecssWebpackPlugin.ts
19
+ // src/config/purgecssWebpackPlugin.ts
20
20
  var purgecssWebpackPlugin_exports = {};
21
21
  __export(purgecssWebpackPlugin_exports, {
22
22
  applyPurgeCSSWebpackPlugin: () => applyPurgeCSSWebpackPlugin
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // speedMeasureWebpackPlugin.ts
22
+ // src/config/speedMeasureWebpackPlugin.ts
23
23
  var speedMeasureWebpackPlugin_exports = {};
24
24
  __export(speedMeasureWebpackPlugin_exports, {
25
25
  addSpeedMeasureWebpackPlugin: () => addSpeedMeasureWebpackPlugin
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // ssrPlugin.ts
19
+ // src/config/ssrPlugin.ts
20
20
  var ssrPlugin_exports = {};
21
21
  __export(ssrPlugin_exports, {
22
22
  default: () => addSSRPlugin
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
36
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // svgRules.ts
39
+ // src/config/svgRules.ts
40
40
  var svgRules_exports = {};
41
41
  __export(svgRules_exports, {
42
42
  addSVGRules: () => addSVGRules
package/dist/constants.js CHANGED
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // constants.ts
19
+ // src/constants.ts
20
20
  var constants_exports = {};
21
21
  __export(constants_exports, {
22
22
  DEFAULT_BROWSER_TARGETS: () => DEFAULT_BROWSER_TARGETS,
package/dist/dev.js CHANGED
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
36
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // dev.ts
39
+ // src/dev.ts
40
40
  var dev_exports = {};
41
41
  __export(dev_exports, {
42
42
  dev: () => dev,
@@ -61,7 +61,7 @@ function stripUndefined(obj) {
61
61
  return obj;
62
62
  }
63
63
  async function dev(opts) {
64
- var _a, _b, _c, _d, _e, _f, _g, _h;
64
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
65
65
  const cacheDirectoryPath = (0, import_path.resolve)(opts.rootDir || opts.cwd, opts.config.cacheDirectoryPath || "node_modules/.cache");
66
66
  const enableMFSU = opts.config.mfsu !== false;
67
67
  let mfsu = null;
@@ -83,6 +83,9 @@ async function dev(opts) {
83
83
  tmpBase: ((_d = opts.config.mfsu) == null ? void 0 : _d.cacheDirectory) || (0, import_path.join)(cacheDirectoryPath, "mfsu"),
84
84
  onMFSUProgress: opts.onMFSUProgress,
85
85
  unMatchLibs: (_e = opts.config.mfsu) == null ? void 0 : _e.exclude,
86
+ shared: (_f = opts.config.mfsu) == null ? void 0 : _f.shared,
87
+ remoteAliases: (_g = opts.config.mfsu) == null ? void 0 : _g.remoteAliases,
88
+ remoteName: (_h = opts.config.mfsu) == null ? void 0 : _h.remoteName,
86
89
  getCacheDependency() {
87
90
  return stripUndefined({
88
91
  version: require("../package.json").version,
@@ -93,7 +96,8 @@ async function dev(opts) {
93
96
  runtimePublicPath: opts.config.runtimePublicPath,
94
97
  publicPath: opts.config.publicPath
95
98
  });
96
- }
99
+ },
100
+ serverBase: `${opts.config.https ? "https" : "http"}://${opts.host}:${opts.port || 8e3}`
97
101
  });
98
102
  }
99
103
  const webpackConfig = await (0, import_config.getConfig)({
@@ -132,14 +136,14 @@ async function dev(opts) {
132
136
  hash: true,
133
137
  staticPathPrefix: import_mfsu.MF_DEP_PREFIX,
134
138
  name: import_constants.MFSU_NAME,
135
- chainWebpack: (_f = opts.config.mfsu) == null ? void 0 : _f.chainWebpack,
139
+ chainWebpack: (_i = opts.config.mfsu) == null ? void 0 : _i.chainWebpack,
136
140
  cache: {
137
- buildDependencies: (_g = opts.cache) == null ? void 0 : _g.buildDependencies,
141
+ buildDependencies: (_j = opts.cache) == null ? void 0 : _j.buildDependencies,
138
142
  cacheDirectory: (0, import_path.join)(cacheDirectoryPath, "mfsu-deps")
139
143
  },
140
144
  pkg: opts.pkg
141
145
  });
142
- (_h = webpackConfig.resolve).alias || (_h.alias = {});
146
+ (_k = webpackConfig.resolve).alias || (_k.alias = {});
143
147
  ["@umijs/utils/compiled/strip-ansi", "react-error-overlay"].forEach((dep) => {
144
148
  webpackConfig.resolve.alias[dep] = require.resolve(dep);
145
149
  });
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ var __copyProps = (to, from, except, desc) => {
13
13
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
14
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
15
 
16
- // index.ts
16
+ // src/index.ts
17
17
  var src_exports = {};
18
18
  module.exports = __toCommonJS(src_exports);
19
19
  var import_requireHook = require("./requireHook");
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // svgr.ts
22
+ // src/loader/svgr.ts
23
23
  var svgr_exports = {};
24
24
  __export(svgr_exports, {
25
25
  default: () => svgr_default
@@ -45,7 +45,7 @@ var __copyProps = (to, from, except, desc) => {
45
45
  };
46
46
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
47
47
 
48
- // swc.ts
48
+ // src/loader/swc.ts
49
49
  var swc_exports = {};
50
50
  __export(swc_exports, {
51
51
  default: () => swc_default
package/dist/parcelCSS.js CHANGED
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // parcelCSS.ts
22
+ // src/parcelCSS.ts
23
23
  var parcelCSS_exports = {};
24
24
  __export(parcelCSS_exports, {
25
25
  parcelCSS: () => parcelCSS
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // ProgressPlugin.ts
19
+ // src/plugins/ProgressPlugin.ts
20
20
  var ProgressPlugin_exports = {};
21
21
  __export(ProgressPlugin_exports, {
22
22
  default: () => ProgressPlugin_default
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // RuntimePublicPathPlugin.ts
19
+ // src/plugins/RuntimePublicPathPlugin.ts
20
20
  var RuntimePublicPathPlugin_exports = {};
21
21
  __export(RuntimePublicPathPlugin_exports, {
22
22
  RuntimePublicPathPlugin: () => RuntimePublicPathPlugin
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // _SamplePlugin.ts
19
+ // src/plugins/_SamplePlugin.ts
20
20
  var SamplePlugin_exports = {};
21
21
  __export(SamplePlugin_exports, {
22
22
  default: () => SamplePlugin_default
@@ -14,7 +14,7 @@ var __copyProps = (to, from, except, desc) => {
14
14
  };
15
15
  var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target, mod2));
16
16
 
17
- // requireHook.ts
17
+ // src/requireHook.ts
18
18
  var import_deepImports = __toESM(require("@umijs/bundler-webpack/compiled/webpack/deepImports.json"));
19
19
  var import_path = require("path");
20
20
  var PKG_ROOT = (0, import_path.join)(__dirname, "../");
package/dist/schema.js CHANGED
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // schema.ts
19
+ // src/schema.ts
20
20
  var schema_exports = {};
21
21
  __export(schema_exports, {
22
22
  getSchemas: () => getSchemas
@@ -98,7 +98,10 @@ function getSchemas() {
98
98
  exclude: Joi.array().items(Joi.alternatives().try(Joi.string(), Joi.object().regex())),
99
99
  include: Joi.array().items(Joi.string()),
100
100
  mfName: Joi.string(),
101
+ remoteAliases: Joi.array().items(Joi.string()),
102
+ remoteName: Joi.string(),
101
103
  runtimePublicPath: Joi.boolean(),
104
+ shared: Joi.object(),
102
105
  strategy: Joi.string().valid("eager", "normal").default("normal")
103
106
  }), Joi.boolean()),
104
107
  outputPath: (Joi) => Joi.string(),
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
36
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // server.ts
39
+ // src/server/server.ts
40
40
  var server_exports = {};
41
41
  __export(server_exports, {
42
42
  createServer: () => createServer
package/dist/server/ws.js CHANGED
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // ws.ts
22
+ // src/server/ws.ts
23
23
  var ws_exports = {};
24
24
  __export(ws_exports, {
25
25
  createWebSocketServer: () => createWebSocketServer
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // autoCSSModules.ts
22
+ // src/swcPlugins/autoCSSModules.ts
23
23
  var autoCSSModules_exports = {};
24
24
  __export(autoCSSModules_exports, {
25
25
  default: () => autoCSSModules_default
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // changeImportFromString.ts
19
+ // src/swcPlugins/changeImportFromString.ts
20
20
  var changeImportFromString_exports = {};
21
21
  __export(changeImportFromString_exports, {
22
22
  changeImportFromString: () => changeImportFromString
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // lockCoreJS.ts
22
+ // src/swcPlugins/lockCoreJS.ts
23
23
  var lockCoreJS_exports = {};
24
24
  __export(lockCoreJS_exports, {
25
25
  default: () => lockCoreJS_default
package/dist/types.js CHANGED
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // types.ts
19
+ // src/types.ts
20
20
  var types_exports = {};
21
21
  __export(types_exports, {
22
22
  CSSMinifier: () => CSSMinifier,
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // browsersList.ts
19
+ // src/utils/browsersList.ts
20
20
  var browsersList_exports = {};
21
21
  __export(browsersList_exports, {
22
22
  getBrowsersList: () => getBrowsersList
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // depMatch.ts
19
+ // src/utils/depMatch.ts
20
20
  var depMatch_exports = {};
21
21
  __export(depMatch_exports, {
22
22
  cleanCache: () => cleanCache,
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // formatWebpackMessages.ts
22
+ // src/utils/formatWebpackMessages.ts
23
23
  var formatWebpackMessages_exports = {};
24
24
  __export(formatWebpackMessages_exports, {
25
25
  formatMessage: () => formatMessage,
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // getEsBuildTarget.ts
19
+ // src/utils/getEsBuildTarget.ts
20
20
  var getEsBuildTarget_exports = {};
21
21
  __export(getEsBuildTarget_exports, {
22
22
  getEsBuildTarget: () => getEsBuildTarget
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/bundler-webpack",
3
- "version": "4.0.0-canary.20220727.1",
3
+ "version": "4.0.0-canary.20220729.1",
4
4
  "description": "@umijs/bundler-webpack",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/bundler-webpack#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -34,11 +34,11 @@
34
34
  "@svgr/plugin-jsx": "^6.2.1",
35
35
  "@svgr/plugin-svgo": "^6.2.0",
36
36
  "@types/hapi__joi": "17.1.8",
37
- "@umijs/babel-preset-umi": "4.0.0-canary.20220727.1",
38
- "@umijs/bundler-utils": "4.0.0-canary.20220727.1",
37
+ "@umijs/babel-preset-umi": "4.0.0-canary.20220729.1",
38
+ "@umijs/bundler-utils": "4.0.0-canary.20220729.1",
39
39
  "@umijs/case-sensitive-paths-webpack-plugin": "^1.0.1",
40
- "@umijs/mfsu": "4.0.0-canary.20220727.1",
41
- "@umijs/utils": "4.0.0-canary.20220727.1",
40
+ "@umijs/mfsu": "4.0.0-canary.20220729.1",
41
+ "@umijs/utils": "4.0.0-canary.20220729.1",
42
42
  "cors": "^2.8.5",
43
43
  "css-loader": "6.7.1",
44
44
  "es5-imcompatible-versions": "^0.1.73",