@vercel/microfrontends 2.1.1 → 2.1.3
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 +13 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/next/config.cjs +9 -8
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.js +9 -8
- package/dist/next/config.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
# @vercel/microfrontends
|
|
2
2
|
|
|
3
|
+
## 2.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 93506f2: Fix Next.js image optimization locally for any image path
|
|
8
|
+
|
|
9
|
+
## 2.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 0606811: Fix local Next.js Image Optimization
|
|
14
|
+
|
|
3
15
|
## 2.1.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
6
18
|
|
|
7
|
-
- 96f0ea5:
|
|
19
|
+
- 96f0ea5:
|
|
8
20
|
- Add support for locally overriding to MFE aliases: https://vercel.com/changelog/preview-links-between-microfrontends-projects-now-serve-all-paths
|
|
9
21
|
- Fix local Next.js image optimization. Next.js released a security fix which removes headers from being passed on image optimization requests. The microfrontends local proxy previously relied on the headers being passed.
|
|
10
22
|
|
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.1.
|
|
33
|
+
version: "2.1.3",
|
|
34
34
|
private: false,
|
|
35
35
|
description: "Defines configuration and utilities for microfrontends development",
|
|
36
36
|
keywords: [
|
package/dist/next/config.cjs
CHANGED
|
@@ -1700,17 +1700,18 @@ function transform4(args) {
|
|
|
1700
1700
|
if (requireLocalProxyHeader) {
|
|
1701
1701
|
const proxyRedirects = [
|
|
1702
1702
|
{
|
|
1703
|
-
source:
|
|
1703
|
+
source: `/:path*`,
|
|
1704
1704
|
destination: `http://localhost:${microfrontend.getLocalProxyPort()}/:path*`,
|
|
1705
1705
|
permanent: false,
|
|
1706
1706
|
missing: [
|
|
1707
|
-
{ type: "header", key: "x-vercel-mfe-local-proxy-origin" }
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1707
|
+
{ type: "header", key: "x-vercel-mfe-local-proxy-origin" }
|
|
1708
|
+
],
|
|
1709
|
+
// this fixes relative path Next.js images locally. A security fix removed the headers from the image request,
|
|
1710
|
+
// https://github.com/vercel/next.js/pull/82114, and locally the image fetch does not follow redirects. This
|
|
1711
|
+
// means the header x-vercel-mfe-local-proxy-origin is stripped, and the redirect to then add the header back
|
|
1712
|
+
// in is not followed. As all headers are stripped, there is also no host header, so this check will ensure
|
|
1713
|
+
// relative path Next.js images are not redirected to the local proxy.
|
|
1714
|
+
has: [{ type: "header", key: "host" }]
|
|
1714
1715
|
}
|
|
1715
1716
|
];
|
|
1716
1717
|
if (next.redirects && typeof next.redirects === "function") {
|