@vercel/microfrontends 1.2.4 → 1.4.0-canary.0
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 +61 -0
- package/README.md +5 -1
- package/dist/bin/cli.cjs +8 -12
- package/dist/config.d.ts +10 -3
- package/dist/experimental/sveltekit.cjs.map +1 -1
- package/dist/experimental/sveltekit.js.map +1 -1
- package/dist/experimental/vite.cjs.map +1 -1
- package/dist/experimental/vite.js.map +1 -1
- package/dist/microfrontends/server.cjs +4 -2
- package/dist/microfrontends/server.cjs.map +1 -1
- package/dist/microfrontends/server.d.ts +13 -4
- package/dist/microfrontends/server.js +2 -1
- package/dist/microfrontends/server.js.map +1 -1
- package/dist/next/config.cjs +59 -30
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.js +66 -30
- package/dist/next/config.js.map +1 -1
- package/dist/next/middleware.cjs +117 -69
- package/dist/next/middleware.cjs.map +1 -1
- package/dist/next/middleware.d.ts +4 -2
- package/dist/next/middleware.js +117 -69
- package/dist/next/middleware.js.map +1 -1
- package/dist/next/testing.cjs +6 -0
- package/dist/next/testing.cjs.map +1 -1
- package/dist/next/testing.d.ts +2 -3
- package/dist/next/testing.js +6 -0
- package/dist/next/testing.js.map +1 -1
- package/dist/overrides.d.ts +3 -3
- package/dist/schema.d.ts +2 -2
- package/dist/{types-c9f15465.d.ts → types-ab31c948.d.ts} +1 -1
- package/dist/{types-bee19651.d.ts → types-d3cb74a6.d.ts} +1 -1
- package/dist/utils/mfe-port.cjs.map +1 -1
- package/dist/utils/mfe-port.js.map +1 -1
- package/dist/validation.d.ts +1 -1
- package/package.json +8 -12
- package/dist/next/endpoints.cjs +0 -154
- package/dist/next/endpoints.cjs.map +0 -1
- package/dist/next/endpoints.d.ts +0 -68
- package/dist/next/endpoints.js +0 -127
- package/dist/next/endpoints.js.map +0 -1
- package/dist/types-b970b583.d.ts +0 -11
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @vercel/microfrontends
|
|
2
|
+
|
|
3
|
+
## 1.4.0-canary.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7817d66: Add support for next.js defineServer instead of custom webpack EnvironmentPlugin
|
|
8
|
+
|
|
9
|
+
## 1.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 8b5f62d: Replace the need to add a `.well-known` endpoint for flagged paths. Instead, just add `/.well-known/vercel/microfrontends/client-config` to your middleware matcher. Note that the middleware is only required if you have flagged paths.
|
|
14
|
+
|
|
15
|
+
## 1.2.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 653c9d2: Improved local development proxy, simplified config, Vite support, more detailed error messages, testing, and more!
|
|
20
|
+
|
|
21
|
+
This release has some minor breaking changes. We try not do this, but at this stage of the project (where we have a relatively small amount of users, each who we're working closely with), we are leaning more towards breaking things and providing clear upgrade instructions so we can move a little quicker. Please let us know if you have concerns with this approach!
|
|
22
|
+
|
|
23
|
+
1. The `fromApp` parameter to your call to `runMicrofrontendsMiddleware` (in your `middleware.ts` file) is gone! Please delete the parameter.
|
|
24
|
+
|
|
25
|
+
- Your code will fail to compile until you delete the parameter.
|
|
26
|
+
|
|
27
|
+
1. The `development.localPort` field in each application in your `microfrontends.json` file is renamed to `development.local`. All you need to do is delete `Port` from the field name and it will continue working exactly as before!
|
|
28
|
+
|
|
29
|
+
- The new field has improved support where you can add a full protocol/host/port if you need (for example, `https://my.localhost.me:8080`), but works the same as before if you just specify a port.
|
|
30
|
+
|
|
31
|
+
1. If the application name in your `microfrontends.json` matches the Vercel project name, the `projectId` field is no longer required, please remove it! We would like to deprecate the `projectId` field in the future. If you have any concerns, please reach out.
|
|
32
|
+
|
|
33
|
+
- `projectId` is annoying to set up so we hope this simplifies things!
|
|
34
|
+
- The Vercel project name should ideally match the application's `package.json` name. If this is not the case, you will need to set the `packageName` field to the `name` from the `package.json` file. This is needed for the local development proxy to work.
|
|
35
|
+
- Visit https://vercel.com/docs/microfrontends/troubleshooting for test utilities to validate the microfrontends setup for your application.
|
|
36
|
+
If you have any issues with these changes, please reach out! We are here to help.
|
|
37
|
+
|
|
38
|
+
## 1.1.0
|
|
39
|
+
|
|
40
|
+
### Minor Changes
|
|
41
|
+
|
|
42
|
+
- 844006a:
|
|
43
|
+
- Add experimental support for SvelteKit.
|
|
44
|
+
- Add experimental support for Vite and React Router.
|
|
45
|
+
- Improved inference for NX monorepos.
|
|
46
|
+
- Support additional path syntax, `/:path(a|b|c)`, `/:path((?!a|b|c).\*)`, and `/some-:hash.js`
|
|
47
|
+
- Fix the next/server import to avoid potential import issues for peer dependencies.
|
|
48
|
+
- Disallow deprecated fields in microfrontends config by default.
|
|
49
|
+
- Improvements/fixes to local development proxy.
|
|
50
|
+
- Add `supportPagesRouter` option that corrects `/\_next/data` requests to the correct child for Next.js Pages Router.
|
|
51
|
+
|
|
52
|
+
## 1.0.0
|
|
53
|
+
|
|
54
|
+
### Major Changes
|
|
55
|
+
|
|
56
|
+
- 37765c3: Initial public release
|
|
57
|
+
|
|
58
|
+
### Minor Changes
|
|
59
|
+
|
|
60
|
+
- b559d60: Add back Vercel specific rewrites in local package for preview and local development without the proxy
|
|
61
|
+
- 00ec734: Add back next config rewrites to deployed apps
|
package/README.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
<
|
|
1
|
+
<picture>
|
|
2
|
+
<source srcset="https://assets.vercel.com/image/upload/v1689795055/docs-assets/static/docs/microfrontends/mfe-banner-dark.png" media="(prefers-color-scheme: dark)">
|
|
3
|
+
<source srcset="https://assets.vercel.com/image/upload/v1689795055/docs-assets/static/docs/microfrontends/mfe-banner-light.png" media="(prefers-color-scheme: light)">
|
|
4
|
+
<img src="https://assets.vercel.com/image/upload/v1689795055/docs-assets/static/docs/microfrontends/mfe-banner-light.png" alt="hero banner">
|
|
5
|
+
</picture>
|
|
2
6
|
|
|
3
7
|
# @vercel/microfrontends
|
|
4
8
|
|
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: "1.
|
|
33
|
+
version: "1.4.0-canary.0",
|
|
34
34
|
private: false,
|
|
35
35
|
description: "Defines configuration and utilities for microfrontends development",
|
|
36
36
|
keywords: [
|
|
@@ -87,10 +87,6 @@ var package_default = {
|
|
|
87
87
|
import: "./dist/next/middleware.js",
|
|
88
88
|
require: "./dist/next/middleware.cjs"
|
|
89
89
|
},
|
|
90
|
-
"./next/endpoints": {
|
|
91
|
-
import: "./dist/next/endpoints.js",
|
|
92
|
-
require: "./dist/next/endpoints.cjs"
|
|
93
|
-
},
|
|
94
90
|
"./next/testing": {
|
|
95
91
|
import: "./dist/next/testing.js",
|
|
96
92
|
require: "./dist/next/testing.cjs"
|
|
@@ -136,9 +132,6 @@ var package_default = {
|
|
|
136
132
|
"next/middleware": [
|
|
137
133
|
"./dist/next/middleware.d.ts"
|
|
138
134
|
],
|
|
139
|
-
"next/endpoints": [
|
|
140
|
-
"./dist/next/endpoints.d.ts"
|
|
141
|
-
],
|
|
142
135
|
"next/testing": [
|
|
143
136
|
"./dist/next/testing.d.ts"
|
|
144
137
|
],
|
|
@@ -155,7 +148,8 @@ var package_default = {
|
|
|
155
148
|
},
|
|
156
149
|
files: [
|
|
157
150
|
"dist",
|
|
158
|
-
"schema"
|
|
151
|
+
"schema",
|
|
152
|
+
"CHANGELOG.md"
|
|
159
153
|
],
|
|
160
154
|
scripts: {
|
|
161
155
|
build: "tsup",
|
|
@@ -170,7 +164,7 @@ var package_default = {
|
|
|
170
164
|
typecheck: "tsc --noEmit"
|
|
171
165
|
},
|
|
172
166
|
dependencies: {
|
|
173
|
-
"@next/env": "15.
|
|
167
|
+
"@next/env": "15.4.0-canary.41",
|
|
174
168
|
ajv: "^8.17.1",
|
|
175
169
|
commander: "^12.1.0",
|
|
176
170
|
cookie: "0.4.0",
|
|
@@ -178,7 +172,8 @@ var package_default = {
|
|
|
178
172
|
"http-proxy": "^1.18.1",
|
|
179
173
|
"jsonc-parser": "^3.3.1",
|
|
180
174
|
nanoid: "^3.3.9",
|
|
181
|
-
"path-to-regexp": "6.2.1"
|
|
175
|
+
"path-to-regexp": "6.2.1",
|
|
176
|
+
semver: "^7.7.2"
|
|
182
177
|
},
|
|
183
178
|
devDependencies: {
|
|
184
179
|
"@edge-runtime/jest-environment": "^4.0.0",
|
|
@@ -192,10 +187,11 @@ var package_default = {
|
|
|
192
187
|
"@types/node": "20.11.30",
|
|
193
188
|
"@types/react": "18.3.1",
|
|
194
189
|
"@types/react-dom": "18.3.0",
|
|
190
|
+
"@types/semver": "^7.7.0",
|
|
195
191
|
"eslint-config-custom": "workspace:*",
|
|
196
192
|
jest: "^29.7.0",
|
|
197
193
|
"jest-environment-jsdom": "29.2.2",
|
|
198
|
-
next: "15.
|
|
194
|
+
next: "15.4.0-canary.41",
|
|
199
195
|
react: "19.0.0",
|
|
200
196
|
"react-dom": "19.0.0",
|
|
201
197
|
"ts-config": "workspace:*",
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { a as ApplicationId, P as PathGroup, D as DefaultApplication$1, b as ChildApplication$1, A as Application$1, C as Config } from './types-ab31c948.js';
|
|
2
|
+
import { H as HostConfig, L as LocalHostConfig, A as ApplicationOverrideConfig, O as OverridesConfig } from './types-d3cb74a6.js';
|
|
3
|
+
|
|
4
|
+
interface ClientApplication {
|
|
5
|
+
routing?: PathGroup[];
|
|
6
|
+
default?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface ClientConfig {
|
|
9
|
+
applications: Record<ApplicationId, ClientApplication>;
|
|
10
|
+
}
|
|
4
11
|
|
|
5
12
|
interface MicrofrontendConfigClientOptions {
|
|
6
13
|
removeFlaggedPaths?: boolean;
|