@vercel/microfrontends 2.0.0-canary.0 → 2.0.0-canary.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/CHANGELOG.md +6 -0
- package/dist/bin/cli.cjs +16 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @vercel/microfrontends
|
|
2
2
|
|
|
3
|
+
## 2.0.0-canary.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Support old and new asset prefixes in local development proxy.
|
|
8
|
+
|
|
3
9
|
## 2.0.0-canary.0
|
|
4
10
|
|
|
5
11
|
> **Check out our [Public Beta](https://vercel.com/changelog/microfrontends-are-now-in-public-beta) changelog to learn more about this release.**
|
package/dist/bin/cli.cjs
CHANGED
|
@@ -30,7 +30,7 @@ var import_env = require("@next/env");
|
|
|
30
30
|
// package.json
|
|
31
31
|
var package_default = {
|
|
32
32
|
name: "@vercel/microfrontends",
|
|
33
|
-
version: "2.0.0-canary.
|
|
33
|
+
version: "2.0.0-canary.1",
|
|
34
34
|
private: false,
|
|
35
35
|
description: "Defines configuration and utilities for microfrontends development",
|
|
36
36
|
keywords: [
|
|
@@ -2173,15 +2173,22 @@ var ProxyRequestRouter = class {
|
|
|
2173
2173
|
}) {
|
|
2174
2174
|
const pathname = url.pathname;
|
|
2175
2175
|
const target = this.getApplicationTarget(app);
|
|
2176
|
+
const assetPrefixes = /* @__PURE__ */ new Set([
|
|
2177
|
+
`vc-ap-${app.name}`,
|
|
2178
|
+
`vc-ap-${hashApplicationName(app.name)}`,
|
|
2179
|
+
app.getAssetPrefix()
|
|
2180
|
+
]);
|
|
2176
2181
|
for (const rewrite of rewrites) {
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2182
|
+
for (const assetPrefix of assetPrefixes) {
|
|
2183
|
+
if ((0, import_path_to_regexp2.pathToRegexp)(`/${assetPrefix}${rewrite}`).test(pathname)) {
|
|
2184
|
+
mfeDebug(
|
|
2185
|
+
`routing ${pathname} to '${target.application}' at ${target.hostname}`
|
|
2186
|
+
);
|
|
2187
|
+
return {
|
|
2188
|
+
path: path7,
|
|
2189
|
+
...target
|
|
2190
|
+
};
|
|
2191
|
+
}
|
|
2185
2192
|
}
|
|
2186
2193
|
}
|
|
2187
2194
|
return null;
|