@nx/react 23.0.0-pr.35413.460eeef → 23.0.0-rc.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/{ast-utils.d.ts → dist/ast-utils.d.ts} +0 -1
- package/dist/babel.d.ts +1 -0
- package/{babel.js → dist/babel.js} +2 -0
- package/{index.d.ts → dist/index.d.ts} +0 -6
- package/{index.js → dist/index.js} +1 -8
- package/dist/internal.d.ts +7 -0
- package/dist/internal.js +26 -0
- package/{mf → dist/mf}/dynamic-federation.d.ts +0 -1
- package/{mf → dist/mf}/index.d.ts +0 -1
- package/{module-federation.d.ts → dist/module-federation.d.ts} +0 -1
- package/dist/plugins/bundle-rollup.d.ts +1 -0
- package/{plugins → dist/plugins}/component-testing/index.d.ts +0 -1
- package/{plugins → dist/plugins}/component-testing/index.js +9 -12
- package/{plugins → dist/plugins}/component-testing/webpack-fallback.d.ts +0 -1
- package/{plugins → dist/plugins}/component-testing/webpack-fallback.js +2 -2
- package/dist/plugins/jest.d.ts +1 -0
- package/{plugins → dist/plugins}/nx-react-webpack-plugin/lib/apply-react-config.d.ts +0 -1
- package/{plugins → dist/plugins}/nx-react-webpack-plugin/nx-react-webpack-plugin.d.ts +0 -1
- package/{plugins → dist/plugins}/storybook/index.d.ts +0 -1
- package/{plugins → dist/plugins}/storybook/index.js +18 -12
- package/{plugins → dist/plugins}/storybook/merge-plugins.d.ts +0 -1
- package/dist/plugins/webpack.d.ts +1 -0
- package/{plugins → dist/plugins}/with-react.d.ts +4 -1
- package/{plugins → dist/plugins}/with-react.js +6 -0
- package/dist/router-plugin.d.ts +1 -0
- package/{router-plugin.js → dist/router-plugin.js} +2 -1
- package/{src → dist/src}/executors/module-federation-dev-server/lib/index.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.js +13 -13
- package/{src → dist/src}/executors/module-federation-dev-server/schema.d.ts +1 -1
- package/{src → dist/src}/executors/module-federation-dev-server/schema.json +1 -0
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +13 -12
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.d.ts +2 -2
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.json +1 -0
- package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.d.ts +1 -2
- package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.js +15 -16
- package/{src → dist/src}/executors/module-federation-static-server/schema.json +1 -0
- package/dist/src/generators/_utils/mf-dependencies.d.ts +7 -0
- package/dist/src/generators/_utils/mf-dependencies.js +84 -0
- package/dist/src/generators/_utils/mf-versions.d.ts +11 -0
- package/dist/src/generators/_utils/mf-versions.js +29 -0
- package/dist/src/generators/_utils/normalize.d.ts +19 -0
- package/dist/src/generators/_utils/normalize.js +48 -0
- package/{src → dist/src}/generators/application/application.d.ts +0 -1
- package/{src → dist/src}/generators/application/application.js +34 -33
- package/{src → dist/src}/generators/application/files/base-rsbuild/tsconfig.app.json__tmpl__ +0 -2
- package/{src/generators/application/files/base-webpack → dist/src/generators/application/files/base-rspack}/tsconfig.app.json__tmpl__ +0 -2
- package/{src → dist/src}/generators/application/files/base-vite/index.html__tmpl__ +1 -1
- package/{src/generators/application/files/base-rspack → dist/src/generators/application/files/base-vite}/tsconfig.app.json__tmpl__ +0 -2
- package/{src/generators/application/files/base-vite → dist/src/generators/application/files/base-webpack}/tsconfig.app.json__tmpl__ +0 -2
- package/{src → dist/src}/generators/application/lib/add-e2e.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-e2e.js +1 -34
- package/{src → dist/src}/generators/application/lib/add-jest.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-linting.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-linting.js +10 -45
- package/{src → dist/src}/generators/application/lib/add-project.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-project.js +14 -4
- package/{src → dist/src}/generators/application/lib/add-routing.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-routing.js +3 -3
- package/{src → dist/src}/generators/application/lib/bundlers/add-rsbuild.d.ts +0 -1
- package/dist/src/generators/application/lib/bundlers/add-rsbuild.js +47 -0
- package/{src → dist/src}/generators/application/lib/bundlers/add-rspack.d.ts +0 -2
- package/dist/src/generators/application/lib/bundlers/add-rspack.js +13 -0
- package/{src → dist/src}/generators/application/lib/bundlers/add-vite.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/bundlers/add-vite.js +11 -36
- package/{src → dist/src}/generators/application/lib/bundlers/add-webpack.d.ts +0 -1
- package/dist/src/generators/application/lib/bundlers/add-webpack.js +18 -0
- package/{src → dist/src}/generators/application/lib/create-application-files.d.ts +2 -4
- package/{src → dist/src}/generators/application/lib/create-application-files.js +10 -62
- package/{src → dist/src}/generators/application/lib/find-free-port.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/get-app-tests.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/install-common-dependencies.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/install-common-dependencies.js +7 -12
- package/{src → dist/src}/generators/application/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/normalize-options.js +5 -9
- package/{src/generators/library → dist/src/generators/application}/lib/set-defaults.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/update-jest-config.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/update-jest-config.js +0 -3
- package/{src → dist/src}/generators/application/schema.d.ts +0 -1
- package/{src → dist/src}/generators/application/schema.json +2 -21
- package/{src → dist/src}/generators/component/component.d.ts +0 -1
- package/{src → dist/src}/generators/component/component.js +8 -9
- package/{src → dist/src}/generators/component/files/__fileName__.__ext__ +3 -18
- package/{src → dist/src}/generators/component/lib/get-component-tests.d.ts +0 -1
- package/{src → dist/src}/generators/component/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/component/lib/normalize-options.js +5 -10
- package/{src → dist/src}/generators/component/schema.d.ts +2 -8
- package/{src → dist/src}/generators/component/schema.json +2 -26
- package/{src → dist/src}/generators/component-story/component-story.d.ts +0 -1
- package/{src → dist/src}/generators/component-story/component-story.js +5 -4
- package/{src → dist/src}/generators/component-test/component-test.d.ts +0 -1
- package/{src → dist/src}/generators/component-test/component-test.js +5 -4
- package/{src → dist/src}/generators/component-test/schema.d.ts +0 -1
- package/dist/src/generators/consumer/consumer.d.ts +4 -0
- package/dist/src/generators/consumer/consumer.js +137 -0
- package/dist/src/generators/consumer/files/_common/src/App.tsx__tmpl__ +53 -0
- package/dist/src/generators/consumer/files/_common/src/bootstrap.tsx__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/_common/src/index.ts__tmpl__ +4 -0
- package/dist/src/generators/consumer/files/_common/src/mf.ts__tmpl__ +35 -0
- package/dist/src/generators/consumer/files/_common/tsconfig.json__tmpl__ +17 -0
- package/dist/src/generators/consumer/files/rsbuild/index.html__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/rsbuild/package.json__tmpl__ +23 -0
- package/dist/src/generators/consumer/files/rsbuild/rsbuild.config.ts__tmpl__ +25 -0
- package/dist/src/generators/consumer/files/rspack/index.html__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/rspack/package.json__tmpl__ +23 -0
- package/dist/src/generators/consumer/files/rspack/rspack.config.ts__tmpl__ +59 -0
- package/dist/src/generators/consumer/files/vite/index.html__tmpl__ +12 -0
- package/dist/src/generators/consumer/files/vite/package.json__tmpl__ +24 -0
- package/dist/src/generators/consumer/files/vite/vite.config.ts__tmpl__ +27 -0
- package/dist/src/generators/consumer/schema.d.ts +8 -0
- package/dist/src/generators/consumer/schema.json +43 -0
- package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.d.ts +0 -1
- package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.js +2 -0
- package/{src → dist/src}/generators/cypress-component-configuration/lib/add-files.d.ts +1 -2
- package/{src → dist/src}/generators/cypress-component-configuration/lib/add-files.js +5 -39
- package/{src → dist/src}/generators/federate-module/federate-module.d.ts +0 -1
- package/{src → dist/src}/generators/federate-module/federate-module.js +6 -2
- package/{src → dist/src}/generators/federate-module/lib/utils.d.ts +0 -1
- package/{src → dist/src}/generators/federate-module/lib/utils.js +2 -2
- package/{src → dist/src}/generators/hook/hook.d.ts +0 -1
- package/{src → dist/src}/generators/hook/hook.js +7 -6
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +2 -2
- package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +2 -2
- package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +2 -2
- package/{src → dist/src}/generators/host/host.d.ts +0 -1
- package/{src → dist/src}/generators/host/host.js +10 -6
- package/{src → dist/src}/generators/host/lib/add-module-federation-files.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/add-module-federation-files.js +3 -3
- package/{src → dist/src}/generators/host/lib/normalize-host-name.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/normalize-host-name.js +2 -2
- package/{src → dist/src}/generators/host/lib/setup-ssr-for-host.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/setup-ssr-for-host.js +1 -1
- package/{src → dist/src}/generators/host/lib/update-module-federation-e2e-project.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/update-module-federation-tsconfig.d.ts +0 -1
- package/{src → dist/src}/generators/host/lib/update-module-federation-tsconfig.js +2 -2
- package/{src → dist/src}/generators/host/schema.json +2 -21
- package/{src → dist/src}/generators/init/init.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.js +5 -3
- package/{src → dist/src}/generators/init/schema.json +1 -1
- package/{src → dist/src}/generators/library/files/common/tsconfig.lib.json__tmpl__ +0 -1
- package/{src → dist/src}/generators/library/files/vite/tsconfig.lib.json__tmpl__ +0 -1
- package/{src → dist/src}/generators/library/lib/add-linting.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/add-linting.js +8 -9
- package/{src → dist/src}/generators/library/lib/add-rollup-build-target.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/add-rollup-build-target.js +8 -7
- package/{src → dist/src}/generators/library/lib/create-files.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/create-files.js +1 -12
- package/{src → dist/src}/generators/library/lib/determine-entry-fields.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/install-common-dependencies.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/install-common-dependencies.js +6 -11
- package/{src → dist/src}/generators/library/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/normalize-options.js +7 -7
- package/{src/generators/application → dist/src/generators/library}/lib/set-defaults.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/update-app-routes.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/update-app-routes.js +3 -3
- package/{src → dist/src}/generators/library/library.d.ts +0 -1
- package/{src → dist/src}/generators/library/library.js +17 -19
- package/{src → dist/src}/generators/library/schema.json +2 -21
- package/dist/src/generators/provider/files/_common/src/__componentName__.tsx__tmpl__ +11 -0
- package/dist/src/generators/provider/files/_common/src/bootstrap.tsx__tmpl__ +12 -0
- package/dist/src/generators/provider/files/_common/src/index.ts__tmpl__ +5 -0
- package/dist/src/generators/provider/files/_common/tsconfig.json__tmpl__ +17 -0
- package/dist/src/generators/provider/files/rsbuild/index.html__tmpl__ +12 -0
- package/dist/src/generators/provider/files/rsbuild/package.json__tmpl__ +22 -0
- package/dist/src/generators/provider/files/rsbuild/rsbuild.config.ts__tmpl__ +31 -0
- package/dist/src/generators/provider/files/rspack/index.html__tmpl__ +12 -0
- package/dist/src/generators/provider/files/rspack/package.json__tmpl__ +22 -0
- package/dist/src/generators/provider/files/rspack/rspack.config.ts__tmpl__ +69 -0
- package/dist/src/generators/provider/files/vite/index.html__tmpl__ +12 -0
- package/dist/src/generators/provider/files/vite/package.json__tmpl__ +23 -0
- package/dist/src/generators/provider/files/vite/vite.config.ts__tmpl__ +37 -0
- package/dist/src/generators/provider/provider.d.ts +4 -0
- package/dist/src/generators/provider/provider.js +94 -0
- package/dist/src/generators/provider/schema.d.ts +9 -0
- package/dist/src/generators/provider/schema.json +46 -0
- package/{src → dist/src}/generators/redux/redux.d.ts +0 -1
- package/{src → dist/src}/generators/redux/redux.js +10 -9
- package/{src → dist/src}/generators/redux/schema.d.ts +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
- package/{src → dist/src}/generators/remote/lib/add-remote-to-dynamic-host.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/setup-package-json-exports-for-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/setup-package-json-exports-for-remote.js +2 -2
- package/{src → dist/src}/generators/remote/lib/setup-ssr-for-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/setup-ssr-for-remote.js +1 -1
- package/{src → dist/src}/generators/remote/lib/setup-tspath-for-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/update-host-with-remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/lib/update-host-with-remote.js +4 -5
- package/{src → dist/src}/generators/remote/remote.d.ts +0 -1
- package/{src → dist/src}/generators/remote/remote.js +12 -8
- package/{src → dist/src}/generators/remote/schema.json +2 -21
- package/{src → dist/src}/generators/setup-ssr/setup-ssr.d.ts +0 -1
- package/{src → dist/src}/generators/setup-ssr/setup-ssr.js +8 -8
- package/{src → dist/src}/generators/stories/stories.d.ts +0 -1
- package/{src → dist/src}/generators/stories/stories.js +9 -8
- package/{src → dist/src}/generators/storybook-configuration/configuration.d.ts +0 -1
- package/{src → dist/src}/generators/storybook-configuration/configuration.js +3 -1
- package/{src → dist/src}/migrations/update-21-0-0/update-babel-loose.d.ts +0 -1
- package/dist/src/migrations/update-21-0-0/update-babel-loose.md +43 -0
- package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts +0 -1
- package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-webpack-config.js +34 -7
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +225 -0
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
- package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.js +128 -0
- package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.md +52 -0
- package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.d.ts +3 -0
- package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.js +215 -0
- package/{src → dist/src}/module-federation/ast-utils.d.ts +0 -1
- package/{src → dist/src}/module-federation/ast-utils.js +2 -2
- package/dist/src/plugins/router-plugin.d.ts +14 -0
- package/{src → dist/src}/plugins/router-plugin.js +20 -25
- package/{src → dist/src}/rules/update-module-federation-project.d.ts +0 -1
- package/{src → dist/src}/rules/update-module-federation-project.js +3 -3
- package/{src → dist/src}/utils/add-mf-env-to-inputs.d.ts +0 -1
- package/dist/src/utils/add-mf-env-to-inputs.js +32 -0
- package/dist/src/utils/assert-supported-react-version.d.ts +2 -0
- package/dist/src/utils/assert-supported-react-version.js +8 -0
- package/{src → dist/src}/utils/assertion.d.ts +0 -1
- package/{src → dist/src}/utils/assertion.js +1 -10
- package/{src → dist/src}/utils/ast-utils.d.ts +0 -1
- package/{src → dist/src}/utils/ast-utils.js +15 -15
- package/{src → dist/src}/utils/component-props.d.ts +0 -1
- package/{src → dist/src}/utils/component-props.js +3 -3
- package/{src → dist/src}/utils/create-ts-config.d.ts +0 -1
- package/{src → dist/src}/utils/create-ts-config.js +3 -10
- package/{src → dist/src}/utils/ct-utils.d.ts +1 -2
- package/{src → dist/src}/utils/ct-utils.js +6 -39
- package/{src → dist/src}/utils/dependencies.d.ts +0 -1
- package/dist/src/utils/deprecation.d.ts +3 -0
- package/dist/src/utils/deprecation.js +33 -0
- package/{src → dist/src}/utils/framework.d.ts +0 -1
- package/{src → dist/src}/utils/get-in-source-vitest-tests-template.d.ts +0 -1
- package/{src → dist/src}/utils/has-rsbuild-plugin.d.ts +0 -1
- package/dist/src/utils/has-rsbuild-plugin.js +12 -0
- package/{src → dist/src}/utils/has-rspack-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/has-vite-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/has-webpack-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/jest-utils.d.ts +0 -1
- package/{src → dist/src}/utils/lint.d.ts +0 -1
- package/{src → dist/src}/utils/maybe-js.d.ts +0 -1
- package/dist/src/utils/module-federation-deprecation.d.ts +12 -0
- package/dist/src/utils/module-federation-deprecation.js +46 -0
- package/{src → dist/src}/utils/normalize-remote.d.ts +0 -1
- package/{src → dist/src}/utils/normalize-remote.js +2 -2
- package/{src → dist/src}/utils/testing-generators.d.ts +0 -1
- package/{src → dist/src}/utils/version-utils.d.ts +1 -1
- package/{src → dist/src}/utils/version-utils.js +3 -0
- package/{src → dist/src}/utils/versions.d.ts +5 -18
- package/dist/src/utils/versions.js +53 -0
- package/dist/tailwind.d.ts +5 -0
- package/{tailwind.js → dist/tailwind.js} +13 -7
- package/dist/typings/cssmodule.d.ts +19 -0
- package/dist/typings/image.d.ts +48 -0
- package/dist/typings/style.d.ts +1 -0
- package/dist/typings/styled-jsx.d.ts +8 -0
- package/{webpack-plugin.d.ts → dist/webpack-plugin.d.ts} +0 -1
- package/executors.json +6 -6
- package/generators.json +46 -40
- package/migrations.json +45 -79
- package/package.json +143 -144
- package/typings/style.d.ts +1 -9
- package/ast-utils.d.ts.map +0 -1
- package/babel.d.ts +0 -25
- package/babel.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/mf/dynamic-federation.d.ts.map +0 -1
- package/mf/index.d.ts.map +0 -1
- package/module-federation.d.ts.map +0 -1
- package/plugins/bundle-rollup.d.ts +0 -2
- package/plugins/bundle-rollup.d.ts.map +0 -1
- package/plugins/component-testing/index.d.ts.map +0 -1
- package/plugins/component-testing/webpack-fallback.d.ts.map +0 -1
- package/plugins/jest.d.ts +0 -2
- package/plugins/jest.d.ts.map +0 -1
- package/plugins/nx-react-webpack-plugin/lib/apply-react-config.d.ts.map +0 -1
- package/plugins/nx-react-webpack-plugin/nx-react-webpack-plugin.d.ts.map +0 -1
- package/plugins/storybook/index.d.ts.map +0 -1
- package/plugins/storybook/merge-plugins.d.ts.map +0 -1
- package/plugins/webpack.d.ts +0 -2
- package/plugins/webpack.d.ts.map +0 -1
- package/plugins/with-react.d.ts.map +0 -1
- package/router-plugin.d.ts +0 -2
- package/router-plugin.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/lib/index.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/lib/normalize-options.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/lib/start-remotes.d.ts.map +0 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/lib/index.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts.map +0 -1
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts.map +0 -1
- package/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts.map +0 -1
- package/src/generators/application/application.d.ts.map +0 -1
- package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +0 -46
- package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +0 -49
- package/src/generators/application/files/style-tailwind/src/app/__fileName__.tsx__tmpl__ +0 -45
- package/src/generators/application/files/style-tailwind/src/styles.css +0 -1
- package/src/generators/application/lib/add-e2e.d.ts.map +0 -1
- package/src/generators/application/lib/add-jest.d.ts.map +0 -1
- package/src/generators/application/lib/add-linting.d.ts.map +0 -1
- package/src/generators/application/lib/add-project.d.ts.map +0 -1
- package/src/generators/application/lib/add-routing.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-rsbuild.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-rsbuild.js +0 -99
- package/src/generators/application/lib/bundlers/add-rspack.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-rspack.js +0 -38
- package/src/generators/application/lib/bundlers/add-vite.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-webpack.d.ts.map +0 -1
- package/src/generators/application/lib/bundlers/add-webpack.js +0 -51
- package/src/generators/application/lib/create-application-files.d.ts.map +0 -1
- package/src/generators/application/lib/find-free-port.d.ts.map +0 -1
- package/src/generators/application/lib/get-app-tests.d.ts.map +0 -1
- package/src/generators/application/lib/install-common-dependencies.d.ts.map +0 -1
- package/src/generators/application/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/application/lib/set-defaults.d.ts.map +0 -1
- package/src/generators/application/lib/show-possible-warnings.d.ts +0 -4
- package/src/generators/application/lib/show-possible-warnings.d.ts.map +0 -1
- package/src/generators/application/lib/show-possible-warnings.js +0 -11
- package/src/generators/application/lib/update-jest-config.d.ts.map +0 -1
- package/src/generators/component/component.d.ts.map +0 -1
- package/src/generators/component/lib/get-component-tests.d.ts.map +0 -1
- package/src/generators/component/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/component-story/component-story.d.ts.map +0 -1
- package/src/generators/component-test/component-test.d.ts.map +0 -1
- package/src/generators/component-test/schema.d.ts.map +0 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts.map +0 -1
- package/src/generators/cypress-component-configuration/lib/add-files.d.ts.map +0 -1
- package/src/generators/federate-module/federate-module.d.ts.map +0 -1
- package/src/generators/federate-module/lib/utils.d.ts.map +0 -1
- package/src/generators/hook/hook.d.ts.map +0 -1
- package/src/generators/host/host.d.ts.map +0 -1
- package/src/generators/host/lib/add-module-federation-files.d.ts.map +0 -1
- package/src/generators/host/lib/normalize-host-name.d.ts.map +0 -1
- package/src/generators/host/lib/setup-ssr-for-host.d.ts.map +0 -1
- package/src/generators/host/lib/update-module-federation-e2e-project.d.ts.map +0 -1
- package/src/generators/host/lib/update-module-federation-tsconfig.d.ts.map +0 -1
- package/src/generators/init/init.d.ts.map +0 -1
- package/src/generators/library/lib/add-linting.d.ts.map +0 -1
- package/src/generators/library/lib/add-rollup-build-target.d.ts.map +0 -1
- package/src/generators/library/lib/create-files.d.ts.map +0 -1
- package/src/generators/library/lib/determine-entry-fields.d.ts.map +0 -1
- package/src/generators/library/lib/install-common-dependencies.d.ts.map +0 -1
- package/src/generators/library/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/library/lib/set-defaults.d.ts.map +0 -1
- package/src/generators/library/lib/update-app-routes.d.ts.map +0 -1
- package/src/generators/library/library.d.ts.map +0 -1
- package/src/generators/redux/redux.d.ts.map +0 -1
- package/src/generators/remote/lib/add-remote-to-dynamic-host.d.ts.map +0 -1
- package/src/generators/remote/lib/setup-package-json-exports-for-remote.d.ts.map +0 -1
- package/src/generators/remote/lib/setup-ssr-for-remote.d.ts.map +0 -1
- package/src/generators/remote/lib/setup-tspath-for-remote.d.ts.map +0 -1
- package/src/generators/remote/lib/update-host-with-remote.d.ts.map +0 -1
- package/src/generators/remote/remote.d.ts.map +0 -1
- package/src/generators/setup-ssr/setup-ssr.d.ts.map +0 -1
- package/src/generators/setup-tailwind/files/postcss.config.js__tmpl__ +0 -15
- package/src/generators/setup-tailwind/files/tailwind.config.js__tmpl__ +0 -17
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts +0 -4
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts.map +0 -1
- package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -27
- package/src/generators/setup-tailwind/lib/update-project.d.ts +0 -4
- package/src/generators/setup-tailwind/lib/update-project.d.ts.map +0 -1
- package/src/generators/setup-tailwind/lib/update-project.js +0 -11
- package/src/generators/setup-tailwind/schema.d.ts +0 -7
- package/src/generators/setup-tailwind/schema.d.ts.map +0 -1
- package/src/generators/setup-tailwind/schema.js +0 -2
- package/src/generators/setup-tailwind/schema.json +0 -47
- package/src/generators/setup-tailwind/setup-tailwind.d.ts +0 -5
- package/src/generators/setup-tailwind/setup-tailwind.d.ts.map +0 -1
- package/src/generators/setup-tailwind/setup-tailwind.js +0 -35
- package/src/generators/stories/stories.d.ts.map +0 -1
- package/src/generators/storybook-configuration/configuration.d.ts.map +0 -1
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts +0 -3
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts.map +0 -1
- package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +0 -31
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts +0 -3
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts.map +0 -1
- package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.js +0 -66
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts +0 -3
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +0 -1
- package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +0 -41
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts +0 -3
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +0 -1
- package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +0 -18
- package/src/migrations/update-21-0-0/update-babel-loose.d.ts.map +0 -1
- package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts.map +0 -1
- package/src/module-federation/ast-utils.d.ts.map +0 -1
- package/src/plugins/router-plugin.d.ts +0 -11
- package/src/plugins/router-plugin.d.ts.map +0 -1
- package/src/rules/add-styled-dependencies.d.ts +0 -6
- package/src/rules/add-styled-dependencies.d.ts.map +0 -1
- package/src/rules/add-styled-dependencies.js +0 -16
- package/src/rules/update-module-federation-project.d.ts.map +0 -1
- package/src/utils/add-mf-env-to-inputs.d.ts.map +0 -1
- package/src/utils/add-mf-env-to-inputs.js +0 -25
- package/src/utils/assertion.d.ts.map +0 -1
- package/src/utils/ast-utils.d.ts.map +0 -1
- package/src/utils/component-props.d.ts.map +0 -1
- package/src/utils/create-ts-config.d.ts.map +0 -1
- package/src/utils/ct-utils.d.ts.map +0 -1
- package/src/utils/dependencies.d.ts.map +0 -1
- package/src/utils/framework.d.ts.map +0 -1
- package/src/utils/get-in-source-vitest-tests-template.d.ts.map +0 -1
- package/src/utils/has-rsbuild-plugin.d.ts.map +0 -1
- package/src/utils/has-rsbuild-plugin.js +0 -43
- package/src/utils/has-rspack-plugin.d.ts.map +0 -1
- package/src/utils/has-vite-plugin.d.ts.map +0 -1
- package/src/utils/has-webpack-plugin.d.ts.map +0 -1
- package/src/utils/jest-utils.d.ts.map +0 -1
- package/src/utils/lint.d.ts.map +0 -1
- package/src/utils/maybe-js.d.ts.map +0 -1
- package/src/utils/normalize-remote.d.ts.map +0 -1
- package/src/utils/styled.d.ts +0 -4
- package/src/utils/styled.d.ts.map +0 -1
- package/src/utils/styled.js +0 -62
- package/src/utils/testing-generators.d.ts.map +0 -1
- package/src/utils/version-utils.d.ts.map +0 -1
- package/src/utils/versions.d.ts.map +0 -1
- package/src/utils/versions.js +0 -64
- package/tailwind.d.ts +0 -7
- package/tailwind.d.ts.map +0 -1
- package/webpack-plugin.d.ts.map +0 -1
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{ast-utils.js → dist/ast-utils.js} +0 -0
- /package/{mf → dist/mf}/dynamic-federation.js +0 -0
- /package/{mf → dist/mf}/index.js +0 -0
- /package/{module-federation.js → dist/module-federation.js} +0 -0
- /package/{plugins → dist/plugins}/bundle-rollup.js +0 -0
- /package/{plugins → dist/plugins}/jest.js +0 -0
- /package/{plugins → dist/plugins}/nx-react-webpack-plugin/lib/apply-react-config.js +0 -0
- /package/{plugins → dist/plugins}/nx-react-webpack-plugin/nx-react-webpack-plugin.js +0 -0
- /package/{plugins → dist/plugins}/storybook/merge-plugins.js +0 -0
- /package/{plugins → dist/plugins}/webpack.js +0 -0
- /package/{src → dist/src}/executors/module-federation-dev-server/lib/index.js +0 -0
- /package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.js +0 -0
- /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.js +0 -0
- /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.js +0 -0
- /package/{src → dist/src}/executors/module-federation-static-server/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/index.html +0 -0
- /package/{src → dist/src}/generators/application/files/base-rsbuild/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/index.html +0 -0
- /package/{src → dist/src}/generators/application/files/base-rspack/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/public/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/environments/environment.prod.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/environments/environment.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-vite/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/assets/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/index.html +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/src/main.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/base-webpack/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/claimed/src/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/not-configured/src/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/nx-welcome/unclaimed/src/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/app-nav.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/entry.client.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/entry.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/root.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/routes/about.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/routes.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/public/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/react-router.config.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tests/routes/_index.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tsconfig.app.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tsconfig.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/non-root/.gitignore__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/non-root/package.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/claimed/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/not-configured/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/unclaimed/app/nx-welcome.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/ts-solution/package.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/react-router-ssr/ts-solution/tsconfig.app.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-css-module/src/app/__fileName__.module.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-css-module/src/styles.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-global-css/src/app/__fileName__.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-global-css/src/styles.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/lib/add-jest.js +0 -0
- /package/{src → dist/src}/generators/application/lib/find-free-port.js +0 -0
- /package/{src → dist/src}/generators/application/lib/get-app-tests.js +0 -0
- /package/{src → dist/src}/generators/application/lib/set-defaults.js +0 -0
- /package/{src → dist/src}/generators/component/files/__fileName__.__style__ +0 -0
- /package/{src → dist/src}/generators/component/files/__fileName__.module.__style__ +0 -0
- /package/{src → dist/src}/generators/component/files/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/component/lib/get-component-tests.js +0 -0
- /package/{src → dist/src}/generators/component-story/files/jsx/__componentFileName__.stories.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/component-story/files/tsx/__componentFileName__.stories.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/component-story/schema.json +0 -0
- /package/{src → dist/src}/generators/component-test/files/__fileName__.cy__ext__ +0 -0
- /package/{src → dist/src}/generators/component-test/schema.js +0 -0
- /package/{src → dist/src}/generators/component-test/schema.json +0 -0
- /package/{src → dist/src}/generators/cypress-component-configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/cypress-component-configuration/schema.json +0 -0
- /package/{src → dist/src}/generators/federate-module/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/federate-module/schema.json +0 -0
- /package/{src → dist/src}/generators/hook/files/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/hook/files/__fileName__.spec.__specExt__ +0 -0
- /package/{src → dist/src}/generators/hook/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/hook/schema.json +0 -0
- /package/{src → dist/src}/generators/host/files/common/src/app/__fileName__.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common/src/main.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/common-ts/src/main.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-common/src/app/__fileName__.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-common/src/main.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-common/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/host/lib/update-module-federation-e2e-project.js +0 -0
- /package/{src → dist/src}/generators/host/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/library/files/common/README.md +0 -0
- /package/{src → dist/src}/generators/library/files/common/src/index.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/library/files/vite/README.md +0 -0
- /package/{src → dist/src}/generators/library/lib/determine-entry-fields.js +0 -0
- /package/{src → dist/src}/generators/library/lib/set-defaults.js +0 -0
- /package/{src → dist/src}/generators/library/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/redux/files/js/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/files/js/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/files/ts/__fileName__.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/files/ts/__fileName__.spec.__ext__ +0 -0
- /package/{src → dist/src}/generators/redux/schema.json +0 -0
- /package/{src → dist/src}/generators/remote/files/common/src/main.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/common/src/remote-entry.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/common-ts/src/main.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/common-ts/src/remote-entry.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-common/src/main.jsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-common/src/remote-entry.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/remote/lib/add-remote-to-dynamic-host.js +0 -0
- /package/{src → dist/src}/generators/remote/lib/setup-tspath-for-remote.js +0 -0
- /package/{src → dist/src}/generators/remote/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-ssr/files/server.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/setup-ssr/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/setup-ssr/schema.json +0 -0
- /package/{src → dist/src}/generators/stories/schema.json +0 -0
- /package/{src → dist/src}/generators/storybook-configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/storybook-configuration/schema.json +0 -0
- /package/{src → dist/src}/migrations/update-21-0-0/update-babel-loose.js +0 -0
- /package/{src → dist/src}/utils/dependencies.js +0 -0
- /package/{src → dist/src}/utils/framework.js +0 -0
- /package/{src → dist/src}/utils/get-in-source-vitest-tests-template.js +0 -0
- /package/{src → dist/src}/utils/has-rspack-plugin.js +0 -0
- /package/{src → dist/src}/utils/has-vite-plugin.js +0 -0
- /package/{src → dist/src}/utils/has-webpack-plugin.js +0 -0
- /package/{src → dist/src}/utils/jest-utils.js +0 -0
- /package/{src → dist/src}/utils/lint.js +0 -0
- /package/{src → dist/src}/utils/maybe-js.js +0 -0
- /package/{src → dist/src}/utils/testing-generators.js +0 -0
- /package/{webpack-plugin.js → dist/webpack-plugin.js} +0 -0
|
@@ -3,14 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.libraryGenerator = libraryGenerator;
|
|
4
4
|
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
|
+
const assert_supported_react_version_1 = require("../../utils/assert-supported-react-version");
|
|
6
8
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
8
|
-
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
9
9
|
const js_1 = require("@nx/js");
|
|
10
10
|
const path_1 = require("path");
|
|
11
|
-
const
|
|
12
|
-
const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
|
|
13
|
-
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
11
|
+
const internal_2 = require("@nx/js/internal");
|
|
14
12
|
const create_ts_config_1 = require("../../utils/create-ts-config");
|
|
15
13
|
const jest_utils_1 = require("../../utils/jest-utils");
|
|
16
14
|
const maybe_js_1 = require("../../utils/maybe-js");
|
|
@@ -33,8 +31,9 @@ async function libraryGenerator(host, schema) {
|
|
|
33
31
|
});
|
|
34
32
|
}
|
|
35
33
|
async function libraryGeneratorInternal(host, schema) {
|
|
34
|
+
(0, assert_supported_react_version_1.assertSupportedReactVersion)(host);
|
|
36
35
|
const tasks = [];
|
|
37
|
-
const addTsPlugin = (0,
|
|
36
|
+
const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(host, schema.addPlugin);
|
|
38
37
|
const jsInitTask = await (0, js_1.initGenerator)(host, {
|
|
39
38
|
...schema,
|
|
40
39
|
addTsPlugin,
|
|
@@ -85,7 +84,7 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
85
84
|
}
|
|
86
85
|
(0, create_files_1.createFiles)(host, options);
|
|
87
86
|
if (options.isUsingTsSolutionConfig) {
|
|
88
|
-
await (0,
|
|
87
|
+
await (0, internal_2.addProjectToTsSolutionWorkspace)(host, options.projectRoot);
|
|
89
88
|
}
|
|
90
89
|
const lintTask = await (0, add_linting_1.addLinting)(host, options);
|
|
91
90
|
tasks.push(lintTask);
|
|
@@ -110,7 +109,7 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
110
109
|
includeLib: true,
|
|
111
110
|
includeVitest: options.unitTestRunner === 'vitest',
|
|
112
111
|
inSourceTests: options.inSourceTests,
|
|
113
|
-
|
|
112
|
+
rolldownOptionsExternal: [
|
|
114
113
|
"'react'",
|
|
115
114
|
"'react-dom'",
|
|
116
115
|
"'react/jsx-runtime'",
|
|
@@ -152,7 +151,7 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
152
151
|
) {
|
|
153
152
|
const { createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
|
|
154
153
|
(0, devkit_1.ensurePackage)('@nx/vitest', versions_1.nxVersion);
|
|
155
|
-
const { configurationGenerator } =
|
|
154
|
+
const { configurationGenerator, } = require('@nx/vitest/generators');
|
|
156
155
|
const vitestTask = await configurationGenerator(host, {
|
|
157
156
|
uiFramework: 'react',
|
|
158
157
|
project: options.name,
|
|
@@ -169,7 +168,7 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
169
168
|
includeLib: true,
|
|
170
169
|
includeVitest: true,
|
|
171
170
|
inSourceTests: options.inSourceTests,
|
|
172
|
-
|
|
171
|
+
rolldownOptionsExternal: [
|
|
173
172
|
"'react'",
|
|
174
173
|
"'react-dom'",
|
|
175
174
|
"'react/jsx-runtime'",
|
|
@@ -184,8 +183,8 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
184
183
|
}, true);
|
|
185
184
|
}
|
|
186
185
|
if (options.component) {
|
|
187
|
-
const relativeCwd = (0,
|
|
188
|
-
const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.fileName);
|
|
186
|
+
const relativeCwd = (0, internal_1.getRelativeCwd)();
|
|
187
|
+
const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.js ? `${options.fileName}.js` : options.fileName);
|
|
189
188
|
const componentTask = await (0, component_1.default)(host, {
|
|
190
189
|
path: relativeCwd ? (0, path_1.relative)(relativeCwd, path) : path,
|
|
191
190
|
style: options.style,
|
|
@@ -193,7 +192,6 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
193
192
|
(options.unitTestRunner === 'vitest' && options.inSourceTests == true),
|
|
194
193
|
export: true,
|
|
195
194
|
routing: options.routing,
|
|
196
|
-
js: options.js,
|
|
197
195
|
name: options.name,
|
|
198
196
|
inSourceTests: options.inSourceTests,
|
|
199
197
|
skipFormat: true,
|
|
@@ -204,14 +202,14 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
204
202
|
if (options.publishable) {
|
|
205
203
|
const projectConfiguration = (0, devkit_1.readProjectConfiguration)(host, options.name);
|
|
206
204
|
if (options.isUsingTsSolutionConfig) {
|
|
207
|
-
await (0,
|
|
205
|
+
await (0, internal_2.addReleaseConfigForTsSolution)(host, options.name, projectConfiguration);
|
|
208
206
|
}
|
|
209
207
|
else {
|
|
210
208
|
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
211
|
-
await (0,
|
|
209
|
+
await (0, internal_2.addReleaseConfigForNonTsSolution)(host, options.name, projectConfiguration);
|
|
212
210
|
}
|
|
213
211
|
(0, devkit_1.updateProjectConfiguration)(host, options.name, projectConfiguration);
|
|
214
|
-
tasks.push(await (0,
|
|
212
|
+
tasks.push(await (0, internal_2.releaseTasks)(host));
|
|
215
213
|
}
|
|
216
214
|
if (!options.skipPackageJson) {
|
|
217
215
|
const installReactTask = await (0, install_common_dependencies_1.installCommonDependencies)(host, options);
|
|
@@ -226,14 +224,14 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
226
224
|
(0, maybe_js_1.maybeJs)(options, (0, devkit_1.joinPathFragments)(options.projectRoot, './src/index.ts')),
|
|
227
225
|
]);
|
|
228
226
|
}
|
|
229
|
-
(0,
|
|
227
|
+
(0, internal_2.updateTsconfigFiles)(host, options.projectRoot, 'tsconfig.lib.json', {
|
|
230
228
|
jsx: 'react-jsx',
|
|
231
229
|
module: 'esnext',
|
|
232
230
|
moduleResolution: 'bundler',
|
|
233
231
|
}, options.linter === 'eslint'
|
|
234
232
|
? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
|
|
235
233
|
: undefined);
|
|
236
|
-
(0,
|
|
234
|
+
(0, internal_2.sortPackageJsonFields)(host, options.projectRoot);
|
|
237
235
|
if (!options.skipFormat) {
|
|
238
236
|
await (0, devkit_1.formatFiles)(host);
|
|
239
237
|
}
|
|
@@ -242,7 +240,7 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
242
240
|
tasks.push(() => (0, devkit_1.installPackagesTask)(host, true));
|
|
243
241
|
}
|
|
244
242
|
tasks.push(() => {
|
|
245
|
-
(0,
|
|
243
|
+
(0, internal_1.logShowProjectCommand)(options.name);
|
|
246
244
|
});
|
|
247
245
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
248
246
|
}
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"type": "string",
|
|
37
37
|
"default": "css",
|
|
38
38
|
"alias": "s",
|
|
39
|
+
"enum": ["css", "scss", "none"],
|
|
39
40
|
"x-prompt": {
|
|
40
41
|
"message": "Which stylesheet format would you like to use?",
|
|
41
42
|
"type": "list",
|
|
@@ -46,27 +47,7 @@
|
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
"value": "scss",
|
|
49
|
-
"label": "SASS(.scss) [ https://sass-lang.com
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"value": "less",
|
|
53
|
-
"label": "LESS [ https://lesscss.org ]"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"value": "tailwind",
|
|
57
|
-
"label": "tailwind [ https://tailwindcss.com/ ]"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"value": "styled-components",
|
|
61
|
-
"label": "styled-components [ https://styled-components.com ]"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"value": "@emotion/styled",
|
|
65
|
-
"label": "emotion [ https://emotion.sh ]"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"value": "styled-jsx",
|
|
69
|
-
"label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
|
|
50
|
+
"label": "SASS(.scss) [ https://sass-lang.com ]"
|
|
70
51
|
},
|
|
71
52
|
{
|
|
72
53
|
"value": "none",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Exposed by the federation plugin as '<%= projectName %>/<%= exposeName %>'.
|
|
2
|
+
// Consumers render it lazily via `lazyProvider('<%= projectName %>', '<%= exposeName %>')`.
|
|
3
|
+
export function <%= componentName %>() {
|
|
4
|
+
return (
|
|
5
|
+
<section data-testid="<%= projectName %>">
|
|
6
|
+
<h1>Hello from <%= projectName %></h1>
|
|
7
|
+
</section>
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default <%= componentName %>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StrictMode } from 'react';
|
|
2
|
+
import { createRoot } from 'react-dom/client';
|
|
3
|
+
import { <%= componentName %> } from './<%= componentName %>';
|
|
4
|
+
|
|
5
|
+
const container = document.getElementById('root');
|
|
6
|
+
if (!container) throw new Error('#root element not found');
|
|
7
|
+
|
|
8
|
+
createRoot(container).render(
|
|
9
|
+
<StrictMode>
|
|
10
|
+
<<%= componentName %> />
|
|
11
|
+
</StrictMode>
|
|
12
|
+
);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Indirection required by Module Federation: the federation runtime must boot
|
|
2
|
+
// before any shared dependency (React, react-dom, etc.) is evaluated. Dynamic
|
|
3
|
+
// `import('./bootstrap')` defers the real entry until federation is ready.
|
|
4
|
+
import('./bootstrap');
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "Bundler",
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"allowSyntheticDefaultImports": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["src"]
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
6
|
+
<title><%= projectName %> (standalone)</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<!-- Rsbuild's html plugin injects the entry script automatically. -->
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= projectName %>",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rsbuild dev --port <%= port %>",
|
|
7
|
+
"build": "rsbuild build",
|
|
8
|
+
"preview": "rsbuild preview --port <%= port %>"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"react": "<%= versions.reactVersion %>",
|
|
12
|
+
"react-dom": "<%= versions.reactDomVersion %>"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@module-federation/rsbuild-plugin": "<%= versions.moduleFederationRsbuildPluginVersion %>",
|
|
16
|
+
"@rsbuild/core": "<%= versions.rsbuildCoreVersion %>",
|
|
17
|
+
"@rsbuild/plugin-react": "<%= versions.rsbuildPluginReactVersion %>",
|
|
18
|
+
"@types/react": "<%= versions.typesReactVersion %>",
|
|
19
|
+
"@types/react-dom": "<%= versions.typesReactDomVersion %>",
|
|
20
|
+
"typescript": "<%= versions.typescriptVersion %>"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineConfig } from '@rsbuild/core';
|
|
2
|
+
import { pluginReact } from '@rsbuild/plugin-react';
|
|
3
|
+
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
|
|
4
|
+
|
|
5
|
+
const PORT = <%= port %>;
|
|
6
|
+
const NAME = '<%= federationName %>';
|
|
7
|
+
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
server: {
|
|
10
|
+
port: PORT,
|
|
11
|
+
// Allow cross-origin fetches from a consumer on a different port.
|
|
12
|
+
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
13
|
+
},
|
|
14
|
+
// assetPrefix:true tells rsbuild to emit chunks with the dev-server URL as
|
|
15
|
+
// their public path. Without it a consumer on a different port asks its
|
|
16
|
+
// own origin for the federated chunks and gets the SPA-fallback HTML.
|
|
17
|
+
dev: { assetPrefix: true },
|
|
18
|
+
html: { template: './index.html' },
|
|
19
|
+
source: { entry: { index: './src/index.ts' } },
|
|
20
|
+
plugins: [
|
|
21
|
+
pluginReact(),
|
|
22
|
+
pluginModuleFederation({
|
|
23
|
+
name: NAME,
|
|
24
|
+
filename: 'remoteEntry.js',
|
|
25
|
+
exposes: {
|
|
26
|
+
'./<%= exposeName %>': './src/<%= componentName %>.tsx',
|
|
27
|
+
},
|
|
28
|
+
shared: ['react', 'react-dom'],
|
|
29
|
+
}),
|
|
30
|
+
],
|
|
31
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
6
|
+
<title><%= projectName %> (standalone)</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<!-- HtmlRspackPlugin injects the entry script automatically; do not add it here. -->
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= projectName %>",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rspack serve --mode=development",
|
|
7
|
+
"build": "rspack build --mode=production"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@module-federation/enhanced": "<%= versions.moduleFederationEnhancedVersion %>",
|
|
11
|
+
"react": "<%= versions.reactVersion %>",
|
|
12
|
+
"react-dom": "<%= versions.reactDomVersion %>"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@rspack/cli": "<%= versions.rspackCliVersion %>",
|
|
16
|
+
"@rspack/core": "<%= versions.rspackCoreVersion %>",
|
|
17
|
+
"@rspack/dev-server": "<%= versions.rspackDevServerVersion %>",
|
|
18
|
+
"@types/react": "<%= versions.typesReactVersion %>",
|
|
19
|
+
"@types/react-dom": "<%= versions.typesReactDomVersion %>",
|
|
20
|
+
"typescript": "<%= versions.typescriptVersion %>"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineConfig } from '@rspack/cli';
|
|
2
|
+
import { rspack } from '@rspack/core';
|
|
3
|
+
import { ModuleFederationPlugin } from '@module-federation/enhanced/rspack';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
|
|
7
|
+
// __dirname is undefined when @rspack/cli loads this config as ESM (it
|
|
8
|
+
// does, because the file uses `import` statements). Derive it from the
|
|
9
|
+
// module URL so the config works regardless of how the loader interprets it.
|
|
10
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
|
|
12
|
+
const PORT = <%= port %>;
|
|
13
|
+
const NAME = '<%= federationName %>';
|
|
14
|
+
|
|
15
|
+
// Read mode from the rspack CLI arg (`--mode=development|production`) so the
|
|
16
|
+
// config works the same on Windows + POSIX without depending on a shell
|
|
17
|
+
// `NODE_ENV=...` prefix.
|
|
18
|
+
export default defineConfig((_env, argv) => {
|
|
19
|
+
const isDev = argv.mode !== 'production';
|
|
20
|
+
return {
|
|
21
|
+
context: __dirname,
|
|
22
|
+
entry: { main: './src/index.ts' },
|
|
23
|
+
output: {
|
|
24
|
+
path: path.resolve(__dirname, 'dist'),
|
|
25
|
+
publicPath: 'auto',
|
|
26
|
+
uniqueName: NAME,
|
|
27
|
+
clean: true,
|
|
28
|
+
},
|
|
29
|
+
devServer: {
|
|
30
|
+
port: PORT,
|
|
31
|
+
historyApiFallback: true,
|
|
32
|
+
hot: true,
|
|
33
|
+
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
34
|
+
},
|
|
35
|
+
resolve: { extensions: ['...', '.ts', '.tsx', '.jsx'] },
|
|
36
|
+
module: {
|
|
37
|
+
rules: [
|
|
38
|
+
{
|
|
39
|
+
test: /\.(j|t)sx?$/,
|
|
40
|
+
exclude: [/node_modules/],
|
|
41
|
+
use: {
|
|
42
|
+
loader: 'builtin:swc-loader',
|
|
43
|
+
options: {
|
|
44
|
+
jsc: {
|
|
45
|
+
parser: { syntax: 'typescript', tsx: true },
|
|
46
|
+
transform: { react: { runtime: 'automatic', development: isDev } },
|
|
47
|
+
},
|
|
48
|
+
env: { targets: 'Chrome >= 87, Firefox >= 78, Edge >= 88, Safari >= 14' },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
plugins: [
|
|
55
|
+
// excludeChunks is REQUIRED on a provider: without it the federation
|
|
56
|
+
// remoteEntry chunk gets injected into the standalone HTML and breaks
|
|
57
|
+
// direct serves.
|
|
58
|
+
new rspack.HtmlRspackPlugin({ template: './index.html', excludeChunks: [NAME] }),
|
|
59
|
+
new ModuleFederationPlugin({
|
|
60
|
+
name: NAME,
|
|
61
|
+
filename: 'remoteEntry.js',
|
|
62
|
+
exposes: {
|
|
63
|
+
'./<%= exposeName %>': './src/<%= componentName %>.tsx',
|
|
64
|
+
},
|
|
65
|
+
shared: ['react', 'react-dom'],
|
|
66
|
+
}),
|
|
67
|
+
],
|
|
68
|
+
};
|
|
69
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
6
|
+
<title><%= projectName %> (standalone)</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/index.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= projectName %>",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite --port <%= port %> --strictPort",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview --port <%= port %> --strictPort"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react": "<%= versions.reactVersion %>",
|
|
13
|
+
"react-dom": "<%= versions.reactDomVersion %>"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@module-federation/vite": "<%= versions.moduleFederationVitePluginVersion %>",
|
|
17
|
+
"@types/react": "<%= versions.typesReactVersion %>",
|
|
18
|
+
"@types/react-dom": "<%= versions.typesReactDomVersion %>",
|
|
19
|
+
"@vitejs/plugin-react": "<%= versions.vitejsPluginReactVersion %>",
|
|
20
|
+
"typescript": "<%= versions.typescriptVersion %>",
|
|
21
|
+
"vite": "<%= versions.viteVersion %>"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import { federation } from '@module-federation/vite';
|
|
4
|
+
|
|
5
|
+
// Port deliberately avoids 5000 (macOS AirTunes binds it on 0.0.0.0, leading
|
|
6
|
+
// to silent EADDRINUSE on 127.0.0.1). Override `--port` only if 5000+ is free.
|
|
7
|
+
const PORT = <%= port %>;
|
|
8
|
+
|
|
9
|
+
export default defineConfig({
|
|
10
|
+
server: {
|
|
11
|
+
port: PORT,
|
|
12
|
+
strictPort: true,
|
|
13
|
+
origin: `http://localhost:${PORT}`,
|
|
14
|
+
host: '127.0.0.1',
|
|
15
|
+
// Allow cross-origin fetches of mf-manifest.json + chunks from a consumer
|
|
16
|
+
// running on a different port. Vite 8 narrows the default CORS allowlist
|
|
17
|
+
// to specific localhost patterns; setting `cors: true` emits a wildcard
|
|
18
|
+
// `Access-Control-Allow-Origin: *` for dev which is what federation needs.
|
|
19
|
+
cors: true,
|
|
20
|
+
},
|
|
21
|
+
preview: { port: PORT, strictPort: true, cors: true },
|
|
22
|
+
build: { target: 'chrome89' },
|
|
23
|
+
plugins: [
|
|
24
|
+
federation({
|
|
25
|
+
name: '<%= federationName %>',
|
|
26
|
+
filename: 'remoteEntry.js',
|
|
27
|
+
exposes: {
|
|
28
|
+
'./<%= exposeName %>': './src/<%= componentName %>.tsx',
|
|
29
|
+
},
|
|
30
|
+
shared: {
|
|
31
|
+
react: { singleton: true },
|
|
32
|
+
'react-dom': { singleton: true },
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
35
|
+
react(),
|
|
36
|
+
],
|
|
37
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.providerGenerator = providerGenerator;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const assert_supported_react_version_1 = require("../../utils/assert-supported-react-version");
|
|
7
|
+
const versions_1 = require("@nx/js/src/utils/versions");
|
|
8
|
+
const versions_2 = require("../../utils/versions");
|
|
9
|
+
const mfVersions = tslib_1.__importStar(require("../_utils/mf-versions"));
|
|
10
|
+
const mf_dependencies_1 = require("../_utils/mf-dependencies");
|
|
11
|
+
const normalize_1 = require("../_utils/normalize");
|
|
12
|
+
// `--mode=...` is rspack's portable equivalent of `NODE_ENV=...` and works on
|
|
13
|
+
// Windows without a shell prefix.
|
|
14
|
+
const BUNDLER_DEV_COMMAND = {
|
|
15
|
+
vite: 'vite',
|
|
16
|
+
rsbuild: 'rsbuild dev',
|
|
17
|
+
rspack: 'rspack serve --mode=development',
|
|
18
|
+
};
|
|
19
|
+
const BUNDLER_BUILD_COMMAND = {
|
|
20
|
+
vite: 'vite build',
|
|
21
|
+
rsbuild: 'rsbuild build',
|
|
22
|
+
rspack: 'rspack build --mode=production',
|
|
23
|
+
};
|
|
24
|
+
async function providerGenerator(tree, schema) {
|
|
25
|
+
(0, assert_supported_react_version_1.assertSupportedReactVersion)(tree);
|
|
26
|
+
const opts = await (0, normalize_1.normalizeScaffoldOptions)(tree, {
|
|
27
|
+
directory: schema.directory,
|
|
28
|
+
surface: 'provider',
|
|
29
|
+
bundler: schema.bundler,
|
|
30
|
+
port: schema.port,
|
|
31
|
+
});
|
|
32
|
+
// `exposeName` is the public MF expose key (consumers reference
|
|
33
|
+
// `<provider>/<exposeName>`) and may be kebab-case, e.g. `cart-widget`.
|
|
34
|
+
// `componentName` is the PascalCase identifier used for the React function
|
|
35
|
+
// and its filename, since `export function cart-widget()` would be invalid.
|
|
36
|
+
const exposeName = schema.exposeName?.trim() || 'App';
|
|
37
|
+
const componentName = (0, devkit_1.names)(exposeName).className;
|
|
38
|
+
// `dependsOn` on a `continuous: true` target lets nx spin up the consumer
|
|
39
|
+
// alongside the provider - matches the deprecated host/remote 'serve a
|
|
40
|
+
// remote, host comes along' UX. Only wired when --consumer is set (e.g.
|
|
41
|
+
// when the consumer generator scaffolds this provider).
|
|
42
|
+
const serveTarget = {
|
|
43
|
+
executor: 'nx:run-commands',
|
|
44
|
+
continuous: true,
|
|
45
|
+
options: {
|
|
46
|
+
command: BUNDLER_DEV_COMMAND[opts.bundler],
|
|
47
|
+
cwd: opts.projectRoot,
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
if (schema.consumer) {
|
|
51
|
+
serveTarget.dependsOn = [`${schema.consumer}:serve`];
|
|
52
|
+
}
|
|
53
|
+
(0, devkit_1.addProjectConfiguration)(tree, opts.projectName, {
|
|
54
|
+
root: opts.projectRoot,
|
|
55
|
+
sourceRoot: (0, devkit_1.joinPathFragments)(opts.projectRoot, 'src'),
|
|
56
|
+
projectType: 'application',
|
|
57
|
+
targets: {
|
|
58
|
+
serve: serveTarget,
|
|
59
|
+
build: {
|
|
60
|
+
executor: 'nx:run-commands',
|
|
61
|
+
options: {
|
|
62
|
+
command: BUNDLER_BUILD_COMMAND[opts.bundler],
|
|
63
|
+
cwd: opts.projectRoot,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
const templateSubstitutions = {
|
|
69
|
+
projectName: opts.projectName,
|
|
70
|
+
federationName: opts.federationName,
|
|
71
|
+
port: opts.port,
|
|
72
|
+
exposeName,
|
|
73
|
+
componentName,
|
|
74
|
+
versions: {
|
|
75
|
+
...mfVersions,
|
|
76
|
+
reactVersion: versions_2.reactVersion,
|
|
77
|
+
reactDomVersion: versions_2.reactDomVersion,
|
|
78
|
+
typesReactVersion: versions_2.typesReactVersion,
|
|
79
|
+
typesReactDomVersion: versions_2.typesReactDomVersion,
|
|
80
|
+
typescriptVersion: versions_1.typescriptVersion,
|
|
81
|
+
},
|
|
82
|
+
tmpl: '',
|
|
83
|
+
};
|
|
84
|
+
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', '_common'), opts.projectRoot, templateSubstitutions);
|
|
85
|
+
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', opts.bundler), opts.projectRoot, templateSubstitutions);
|
|
86
|
+
// Write deps into the workspace root package.json so bare bundler bins
|
|
87
|
+
// resolve when nx invokes the generated run-commands serve target. The
|
|
88
|
+
// per-project package.json template still ships for pnpm-workspace setups.
|
|
89
|
+
const deps = (0, mf_dependencies_1.getProviderDeps)(opts.bundler);
|
|
90
|
+
const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, deps.dependencies, deps.devDependencies, undefined, true);
|
|
91
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
92
|
+
return (0, devkit_1.runTasksInSerial)(installTask);
|
|
93
|
+
}
|
|
94
|
+
exports.default = providerGenerator;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "NxReactProvider",
|
|
4
|
+
"title": "Create a Module Federation provider",
|
|
5
|
+
"description": "Scaffold a React Module Federation provider that exposes a federated component. The bundler is selected at generation time; the generated project has no Nx-wrapped bundler config.",
|
|
6
|
+
"cli": "nx",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"directory": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Directory the provider is generated in, e.g. `apps/my-provider`. The project name (also used as the federation `name`, with hyphens converted to underscores) is inferred from the trailing path segment.",
|
|
12
|
+
"alias": "dir",
|
|
13
|
+
"$default": { "$source": "argv", "index": 0 },
|
|
14
|
+
"x-prompt": "Which directory do you want to create the provider in?"
|
|
15
|
+
},
|
|
16
|
+
"bundler": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Bundler used by the provider. The choice is final - the bundler config is too different to switch later.",
|
|
19
|
+
"enum": ["vite", "rsbuild", "rspack"],
|
|
20
|
+
"default": "vite",
|
|
21
|
+
"x-prompt": {
|
|
22
|
+
"message": "Which bundler should the provider use?",
|
|
23
|
+
"type": "list",
|
|
24
|
+
"items": [
|
|
25
|
+
{ "value": "vite", "label": "Vite (default)" },
|
|
26
|
+
{ "value": "rsbuild", "label": "Rsbuild" },
|
|
27
|
+
{ "value": "rspack", "label": "Rspack" }
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"port": {
|
|
32
|
+
"type": "number",
|
|
33
|
+
"description": "Dev-server port the provider listens on. Defaults to a non-5000 port to avoid the macOS AirTunes collision on Vite."
|
|
34
|
+
},
|
|
35
|
+
"exposeName": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Name under which the federated component is exposed (consumers reference `<name>/<exposeName>`).",
|
|
38
|
+
"default": "App"
|
|
39
|
+
},
|
|
40
|
+
"consumer": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "Name of a consumer project whose `serve` target this provider should depend on. When set, `nx serve <provider>` also spins up the consumer (the 'serve a remote, host comes along' UX from the deprecated host/remote generators). Set automatically when the provider is generated as part of `@nx/react:consumer --providerNames=...`."
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": ["directory"]
|
|
46
|
+
}
|