将 @nx/react 从 23.x 升级到 24.x
根据 TypeScript 类型自动比较 @nx/react 23.3.1 与 24.0.0 的公开 API。签名变化表示可能存在不兼容变更,并非确定结论。
概要
| 已删除的导入路径 | 1 |
|---|---|
| 已删除的导出 | 2 |
| 已修改的签名 | 4 |
| 已删除的类或接口成员 | 1 |
| 已修改的类或接口成员 | 0 |
| 新增弃用 | 2 |
| 要求变化(engines、peer 依赖) | 3 |
| 新增导出 | 1 |
已删除的导入路径
| 已删除的导入路径 |
|---|
@nx/react/mf |
已删除的导出
| import | export | kind | 之前 |
|---|---|---|---|
@nx/react | hostGenerator | function | (host: Tree, schema: Schema): Promise<GeneratorCallback> |
@nx/react | remoteGenerator | function | (host: Tree, schema: Schema): Promise<GeneratorCallback> |
已修改的签名
| export | 之前 | 之后 |
|---|---|---|
@nx/react · withReact | (pluginOptions?: WithReactOptions | undefined): (config: Configuration, context: NxWebpackExecutionContext) => Configuration | (_options?: WithReactOptions | undefined): (config: Configuration, _context?: any) => Configuration |
@nx/react/module-federation · withModuleFederation | any | (..._args: unknown[]): Promise<IdentityConfigFn> |
@nx/react/module-federation · withModuleFederationForSSR | any | (..._args: unknown[]): Promise<IdentityConfigFn> |
@nx/react/plugins/with-react · withReact | (pluginOptions?: WithReactOptions | undefined): (config: Configuration, context: NxWebpackExecutionContext) => Configuration | (_options?: WithReactOptions | undefined): (config: Configuration, _context?: any) => Configuration |
已删除的类或接口成员
| member | import | 之前 |
|---|---|---|
ReactRouterPluginOptions.typecheckTargetName | @nx/react/router-plugin | string | undefined |
已修改的类或接口成员
未发现。
新增弃用
| export | @deprecated |
|---|---|
@nx/react/module-federation · withModuleFederation | Removed in Nx v24. Use `ModuleFederationPlugin` from `@module-federation/enhanced`. This stub will be removed in Nx v25. |
@nx/react/module-federation · withModuleFederationForSSR | Removed in Nx v24. Use `ModuleFederationPlugin` from `@module-federation/enhanced`. This stub will be removed in Nx v25. |
要求变化(engines、peer 依赖)
| 之前 | 之后 | |
|---|---|---|
peerDependencies.express | ^4.21.2 | — |
peerDependencies.@nx/module-federation | 23.3.1 | — |
peerDependencies.http-proxy-middleware | ^3.0.7 | — |
新增导出 (1)
| import | export | kind |
|---|---|---|
@nx/react/internal | applyReactConfig | function |
把这些数据交给你的 AI 智能体
Vigia 是免费的 MCP 服务器:你的编程智能体在写代码之前就能检查版本、不兼容变更和安全漏洞。无需注册,无需 API 密钥。
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
添加到 Cursor添加到 VS Code★ 在 GitHub 上加星
任何其他 MCP 客户端
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }常见问题
将 @nx/react 从 23 升级到 24 有哪些不兼容变更?
在 @nx/react 23.3.1 与 24.0.0 之间,Vigia 发现 2 个已删除的导出、4 个已修改的签名,以及 1 个已删除或修改的类或接口成员。
@nx/react 24 中弃用了哪些内容?
@nx/react 24.0.0 中有 2 个导出或成员新被标记为弃用。
供智能体使用
GET https://vigia.coredls.cloud/v1/packages/npm/@nx/react/upgrade?from=23.3.1&to=24.0.0