@nx/react:migrations | Nx

Migration References

Here is a list of all migrations available for this package.

  • 21.0.x

  • update-21-0-0-update-babel-loose

    Replaces `classProperties.loose` option with `loose`.

    Version: 21.0.0-beta.11

    Replace classProperties.loose option in .babelrc

    The classProperties.loose option is replaced by loose in .babelrc files.

    Sample Code Changes

    .babelrc
    1{ 2 "presets": [ 3 [ 4 "@nx/react/babel", 5 { 6 "runtime": "automatic", 7 "classProperties": { 8 "loose": true 9 }, 10 "useBuiltIns": "usage" 11 } 12 ] 13 ], 14 "plugins": [] 15} 16
  • 20.4.x

  • add-mf-env-var-to-target-defaults

    Add NX_MF_DEV_REMOTES to inputs for task hashing when '@nx/webpack:webpack' or '@nx/rspack:rspack' is used for Module Federation.

    Version: 20.4.0-beta.0

    Add Module Federation Env Var to Target Defaults

    Add NX_MF_DEV_REMOTES to inputs for task hashing when @nx/webpack:webpack or @nx/rspack:rspack is used for Module Federation.

    Sample Code Changes

    nx.json
    1{ 2 "targetDefaults": { 3 "@nx/webpack:webpack": { 4 "inputs": ["^build"] 5 } 6 } 7} 8
  • 20.3.x

  • ensure-nx-module-federation-package

    If workspace includes Module Federation projects, ensure the new @nx/module-federation package is installed.

    Version: 20.3.0-beta.2

    Ensure the @nx/module-federation Package is Installed

    If workspace includes Module Federation projects, ensure the new @nx/module-federation package is installed.

    Sample Code Changes

    package.json
    1{ 2 "dependencies": {} 3} 4

    20.3.0-package-updates

    Version: 20.3.0-beta.0

    Packages

    NameVersionAlways Add to package.json
    @testing-library/react16.1.0Update only
  • 20.2.x

  • 20.2.0-package-updates

    Version: 20.2.0-beta.3

    Packages

    NameVersionAlways Add to package.json
    @module-federation/enhanced0.7.6Update only
    @module-federation/runtime0.7.6Update only
    @module-federation/sdk0.7.6Update only
    @module-federation/node2.6.11Update only

    update-20-2-0-update-module-federation-config-import

    Update the ModuleFederationConfig import use @nx/module-federation.

    Version: 20.2.0-beta.2

    Migrate Module Federation Imports to New Package

    Update the ModuleFederationConfig imports to use @nx/module-federation.

    Sample Code Changes

    Update import paths for ModuleFederationConfig.

    apps/shell/webpack.config.js
    1import { ModuleFederationConfig } from '@nx/webpack'; 2
    apps/shell/rspack.config.js
    1import { ModuleFederationConfig } from '@nx/rspack/module-federation'; 2

    update-20-2-0-update-with-module-federation-import

    Update the withModuleFederation import use @nx/module-federation/webpack.

    Version: 20.2.0-beta.2

    Migrate withModuleFederation Import to New Package

    Update the withModuleFederation import to use @nx/module-federation/webpack.

    Sample Code Changes

    Update import paths for withModuleFederation and withModuleFederationForSSR.

    apps/shell/webpack.config.ts
    1import { 2 withModuleFederation, 3 withModuleFederationForSSR, 4} from '@nx/react/module-federation'; 5
  • 20.1.x

  • 20.1.0-package-updates

    Version: 20.1.0-beta.0

    Packages

    NameVersionAlways Add to package.json
    eslint-plugin-react-hooks5.0.0Update only
    eslint-plugin-jsx-a11y6.10.1Update only
  • 20.0.x

  • 20.0.0-package-updates

    Version: 20.0.0-beta.8

    Packages

    NameVersionAlways Add to package.json
    eslint-plugin-import2.31.0Update only
  • 19.7.x

  • 19.7.0-package-updates

    Version: 19.7.0-beta.0

    Packages

    NameVersionAlways Add to package.json
    @module-federation/enhanced~0.6.0Update only
    @module-federation/node~2.5.0Update only
  • 19.6.x

  • update-19-6-1-ensure-module-federation-target-defaults

    Ensure Target Defaults are set correctly for Module Federation.

    Version: 19.6.1-beta.0

    update-19-6-0-turn-module-federation-dts-off

    Ensure Module Federation DTS is turned off by default.

    Version: 19.6.0-beta.4

    update-module-federation-ssr-server-file

    Update the server file for Module Federation SSR port value to be the same as the 'serve' target port value.

    Version: 19.6.0-beta.4
  • 19.5.x

  • 19.5.0-module-federation-package-updates

    Version: 19.5.0-beta.0

    Packages

    NameVersionAlways Add to package.json
    @module-federation/node^2.3.0Update only
  • 19.2.x

  • 19.2.0-package-updates

    Version: 19.2.0-beta.8

    Packages

    NameVersionAlways Add to package.json
    postcss8.4.38Update only
  • 19.0.x

  • 19.0.3-package-updates

    Version: 19.0.3-beta.0

    Packages

    NameVersionAlways Add to package.json
    tailwindcss3.4.3Update only

    19.0.0-package-updates

    Version: 19.0.0-beta.12

    Packages

    NameVersionAlways Add to package.json
    react18.3.1Update only
    react-dom18.3.1Update only
    react-is18.3.1Update only
    @types/react18.3.1Update only
    @types/react-dom18.3.0Update only
    @types/react-is18.3.0Update only
    @testing-library/react15.0.6Update only