@umijs/mfsu 4.0.0-rc.12 → 4.0.0-rc.13
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/mfsu.d.ts +1 -0
- package/dist/mfsu.js +3 -1
- package/package.json +4 -4
package/dist/mfsu.d.ts
CHANGED
package/dist/mfsu.js
CHANGED
|
@@ -38,6 +38,7 @@ class MFSU {
|
|
|
38
38
|
this.depConfig = null;
|
|
39
39
|
this.buildDepsAgain = false;
|
|
40
40
|
this.progress = { done: false };
|
|
41
|
+
this.publicPath = '/';
|
|
41
42
|
this.opts = opts;
|
|
42
43
|
this.opts.mfName = this.opts.mfName || constants_1.DEFAULT_MF_NAME;
|
|
43
44
|
this.opts.tmpBase =
|
|
@@ -129,6 +130,7 @@ class MFSU {
|
|
|
129
130
|
if (publicPath === 'auto') {
|
|
130
131
|
publicPath = '/';
|
|
131
132
|
}
|
|
133
|
+
this.publicPath = publicPath;
|
|
132
134
|
opts.config.plugins.push(...[
|
|
133
135
|
new webpack_virtual_modules_1.default(virtualModules),
|
|
134
136
|
new this.opts.implementor.container.ModuleFederationPlugin({
|
|
@@ -231,7 +233,7 @@ promise new Promise(resolve => {
|
|
|
231
233
|
getMiddlewares() {
|
|
232
234
|
return [
|
|
233
235
|
(req, res, next) => {
|
|
234
|
-
const publicPath =
|
|
236
|
+
const publicPath = this.publicPath;
|
|
235
237
|
const isMF = req.path.startsWith(`${publicPath}${constants_1.MF_VA_PREFIX}`) ||
|
|
236
238
|
req.path.startsWith(`${publicPath}${constants_1.MF_DEP_PREFIX}`) ||
|
|
237
239
|
req.path.startsWith(`${publicPath}${constants_1.MF_STATIC_PREFIX}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umijs/mfsu",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.13",
|
|
4
4
|
"description": "@umijs/mfsu",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi-next/tree/master/packages/mfsu#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi-next/issues",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"test": "jest -c ../../jest.turbo.config.ts"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@umijs/bundler-esbuild": "4.0.0-rc.
|
|
26
|
-
"@umijs/bundler-utils": "4.0.0-rc.
|
|
27
|
-
"@umijs/utils": "4.0.0-rc.
|
|
25
|
+
"@umijs/bundler-esbuild": "4.0.0-rc.13",
|
|
26
|
+
"@umijs/bundler-utils": "4.0.0-rc.13",
|
|
27
|
+
"@umijs/utils": "4.0.0-rc.13",
|
|
28
28
|
"enhanced-resolve": "5.9.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|