@nx/rspack 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/{app-plugin.d.ts → dist/app-plugin.d.ts} +0 -1
- package/{module-federation.d.ts → dist/module-federation.d.ts} +0 -1
- package/dist/plugin.d.ts +2 -0
- package/{plugin.js → dist/plugin.js} +2 -1
- package/{react-plugin.d.ts → dist/react-plugin.d.ts} +0 -1
- package/dist/readme-template.md +18 -0
- package/{src → dist/src}/executors/dev-server/dev-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/dev-server/dev-server.impl.js +6 -4
- package/{src → dist/src}/executors/dev-server/lib/get-dev-server-config.d.ts +0 -1
- package/{src → dist/src}/executors/dev-server/lib/serve-path.d.ts +0 -1
- package/{src → dist/src}/executors/dev-server/schema.json +1 -0
- 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 +11 -10
- 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 +10 -8
- package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.d.ts +1 -1
- 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/{src → dist/src}/executors/rspack/lib/config.d.ts +0 -1
- package/{src → dist/src}/executors/rspack/lib/config.js +5 -2
- package/{src → dist/src}/executors/rspack/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/executors/rspack/lib/normalize-options.js +2 -2
- package/{src → dist/src}/executors/rspack/rspack.impl.d.ts +0 -1
- package/{src → dist/src}/executors/rspack/rspack.impl.js +6 -4
- package/{src → dist/src}/executors/rspack/schema.json +1 -0
- package/{src → dist/src}/executors/ssr-dev-server/lib/wait-until-server-is-listening.d.ts +0 -1
- package/{src → dist/src}/executors/ssr-dev-server/ssr-dev-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/ssr-dev-server/ssr-dev-server.impl.js +2 -2
- package/{src → dist/src}/generators/configuration/configuration.d.ts +0 -1
- package/{src → dist/src}/generators/configuration/configuration.js +13 -10
- package/{src → dist/src}/generators/convert-config-to-rspack-plugin/convert-config-to-rspack-plugin.d.ts +0 -1
- package/{src → dist/src}/generators/convert-config-to-rspack-plugin/convert-config-to-rspack-plugin.js +5 -7
- package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/extract-rspack-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/normalize-path-options.d.ts +0 -1
- package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/utils.d.ts +0 -1
- package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/validate-project.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.js +13 -6
- package/{src → dist/src}/generators/convert-to-inferred/utils/ast.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/utils/build-post-target-transformer.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/utils/build-post-target-transformer.js +8 -8
- package/{src → dist/src}/generators/convert-to-inferred/utils/index.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/utils/serve-post-target-transformer.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/utils/serve-post-target-transformer.js +4 -4
- package/{src → dist/src}/generators/convert-to-inferred/utils/types.d.ts +1 -2
- package/{src → dist/src}/generators/convert-webpack/convert-webpack.d.ts +0 -1
- package/{src → dist/src}/generators/convert-webpack/convert-webpack.js +8 -1
- package/{src → dist/src}/generators/convert-webpack/lib/transform-cjs.d.ts +0 -1
- package/{src → dist/src}/generators/convert-webpack/lib/transform-esm.d.ts +0 -1
- package/{src → dist/src}/generators/convert-webpack/lib/transform-plugin-config.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.js +16 -10
- package/{src → dist/src}/generators/init/schema.json +1 -1
- package/{src → dist/src}/index.d.ts +0 -1
- package/{src → dist/src}/migrations/update-22-0-0/remove-deprecated-options.d.ts +0 -1
- package/{src → dist/src}/migrations/update-22-0-0/remove-deprecated-options.js +3 -3
- package/dist/src/migrations/update-23-0-0/add-svgr-to-rspack-config.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/add-svgr-to-rspack-config.js +413 -0
- package/dist/src/migrations/update-23-0-0/add-svgr-to-rspack-config.md +84 -0
- 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 +223 -0
- package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
- package/{src → dist/src}/plugins/generate-package-json-plugin.d.ts +0 -1
- package/{src → dist/src}/plugins/nx-app-rspack-plugin/nx-app-rspack-plugin.d.ts +0 -1
- package/dist/src/plugins/nx-react-rspack-plugin/nx-react-rspack-plugin.d.ts +6 -0
- package/{src → dist/src}/plugins/plugin.d.ts +6 -3
- package/{src → dist/src}/plugins/plugin.js +23 -29
- package/{src → dist/src}/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/apply-base-config.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/apply-base-config.js +2 -2
- package/dist/src/plugins/utils/apply-react-config.d.ts +2 -0
- package/dist/src/plugins/utils/apply-react-config.js +20 -0
- package/{src → dist/src}/plugins/utils/apply-web-config.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/apply-web-config.js +7 -17
- package/{src → dist/src}/plugins/utils/get-css-module-local-ident.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/get-non-buildable-libs.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/get-terser-ecma-version.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/get-transitive-deps.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/hash-format.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/instantiate-script-plugins.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/is-lib-buildable.d.ts +0 -1
- package/dist/src/plugins/utils/loaders/deprecated-less-loader.js +19 -0
- package/{src → dist/src}/plugins/utils/loaders/stylesheet-loaders.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/models.d.ts +1 -11
- package/{src → dist/src}/plugins/utils/normalize-entry.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/plugins/generate-package-json-plugin.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/plugins/normalize-options.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/plugins/normalize-options.js +2 -2
- package/{src → dist/src}/plugins/utils/plugins/nx-tsconfig-paths-rspack-plugin.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/plugins/nx-tsconfig-paths-rspack-plugin.js +3 -3
- package/{src → dist/src}/plugins/utils/plugins/postcss-cli-resources.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/plugins/rspack-nx-build-coordination-plugin.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/plugins/scripts-rspack-plugin.d.ts +0 -1
- package/{src → dist/src}/plugins/utils/plugins/stats-json-plugin.d.ts +0 -1
- package/{src → dist/src}/plugins/write-index-html-plugin.d.ts +0 -1
- package/dist/src/utils/assert-supported-rspack-version.d.ts +2 -0
- package/dist/src/utils/assert-supported-rspack-version.js +8 -0
- package/{src → dist/src}/utils/config.d.ts +14 -1
- package/{src → dist/src}/utils/config.js +19 -2
- package/{src → dist/src}/utils/create-compiler.d.ts +0 -1
- package/dist/src/utils/deprecation.d.ts +8 -0
- package/dist/src/utils/deprecation.js +50 -0
- package/dist/src/utils/e2e-web-server-info-utils.d.ts +2 -0
- package/{src → dist/src}/utils/e2e-web-server-info-utils.js +6 -5
- package/{src → dist/src}/utils/generator-utils.d.ts +0 -1
- package/{src → dist/src}/utils/generator-utils.js +3 -4
- package/{src → dist/src}/utils/get-copy-patterns.d.ts +0 -1
- package/{src → dist/src}/utils/has-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/jest-utils.d.ts +0 -1
- package/{src → dist/src}/utils/mode-utils.d.ts +0 -1
- package/{src → dist/src}/utils/model.d.ts +0 -1
- package/dist/src/utils/module-federation-deprecation.d.ts +6 -0
- package/dist/src/utils/module-federation-deprecation.js +30 -0
- package/{src → dist/src}/utils/normalize-assets.d.ts +0 -1
- package/{src → dist/src}/utils/read-rspack-options.d.ts +0 -1
- package/{src → dist/src}/utils/resolve-user-defined-rspack-config.d.ts +0 -1
- package/{src → dist/src}/utils/resolve-user-defined-rspack-config.js +2 -2
- package/dist/src/utils/version-utils.d.ts +26 -0
- package/dist/src/utils/version-utils.js +53 -0
- package/dist/src/utils/versions.d.ts +23 -0
- package/dist/src/utils/versions.js +29 -0
- package/{src → dist/src}/utils/webpack/interpolate-env-variables-to-index.d.ts +0 -1
- package/{src → dist/src}/utils/webpack/normalize-entry.d.ts +0 -1
- package/{src → dist/src}/utils/webpack/package-chunk-sort.d.ts +0 -1
- package/{src → dist/src}/utils/with-nx.d.ts +4 -1
- package/{src → dist/src}/utils/with-nx.js +6 -0
- package/dist/src/utils/with-react.d.ts +12 -0
- package/{src → dist/src}/utils/with-react.js +9 -1
- package/{src → dist/src}/utils/with-web.d.ts +7 -2
- package/{src → dist/src}/utils/with-web.js +8 -0
- package/executors.json +12 -12
- package/generators.json +10 -10
- package/migrations.json +60 -47
- package/package.json +138 -20
- package/app-plugin.d.ts.map +0 -1
- package/module-federation.d.ts.map +0 -1
- package/plugin.d.ts +0 -3
- package/plugin.d.ts.map +0 -1
- package/react-plugin.d.ts.map +0 -1
- package/src/executors/dev-server/dev-server.impl.d.ts.map +0 -1
- package/src/executors/dev-server/lib/get-dev-server-config.d.ts.map +0 -1
- package/src/executors/dev-server/lib/serve-path.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/executors/rspack/lib/config.d.ts.map +0 -1
- package/src/executors/rspack/lib/normalize-options.d.ts.map +0 -1
- package/src/executors/rspack/rspack.impl.d.ts.map +0 -1
- package/src/executors/ssr-dev-server/lib/wait-until-server-is-listening.d.ts.map +0 -1
- package/src/executors/ssr-dev-server/ssr-dev-server.impl.d.ts.map +0 -1
- package/src/generators/configuration/configuration.d.ts.map +0 -1
- package/src/generators/convert-config-to-rspack-plugin/convert-config-to-rspack-plugin.d.ts.map +0 -1
- package/src/generators/convert-config-to-rspack-plugin/lib/extract-rspack-options.d.ts.map +0 -1
- package/src/generators/convert-config-to-rspack-plugin/lib/normalize-path-options.d.ts.map +0 -1
- package/src/generators/convert-config-to-rspack-plugin/lib/utils.d.ts.map +0 -1
- package/src/generators/convert-config-to-rspack-plugin/lib/validate-project.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/utils/ast.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/utils/build-post-target-transformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/utils/index.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/utils/serve-post-target-transformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/utils/types.d.ts.map +0 -1
- package/src/generators/convert-webpack/convert-webpack.d.ts.map +0 -1
- package/src/generators/convert-webpack/lib/transform-cjs.d.ts.map +0 -1
- package/src/generators/convert-webpack/lib/transform-esm.d.ts.map +0 -1
- package/src/generators/convert-webpack/lib/transform-plugin-config.d.ts.map +0 -1
- package/src/generators/init/init.d.ts.map +0 -1
- package/src/index.d.ts.map +0 -1
- 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-2-0/migrate-with-mf-import-to-new-package.md +0 -25
- 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-20-3-0/ensure-nx-module-federation-package.md +0 -23
- package/src/migrations/update-22-0-0/remove-deprecated-options.d.ts.map +0 -1
- package/src/plugins/generate-package-json-plugin.d.ts.map +0 -1
- package/src/plugins/nx-app-rspack-plugin/nx-app-rspack-plugin.d.ts.map +0 -1
- package/src/plugins/nx-react-rspack-plugin/nx-react-rspack-plugin.d.ts +0 -13
- package/src/plugins/nx-react-rspack-plugin/nx-react-rspack-plugin.d.ts.map +0 -1
- package/src/plugins/plugin.d.ts.map +0 -1
- package/src/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.d.ts.map +0 -1
- package/src/plugins/utils/apply-base-config.d.ts.map +0 -1
- package/src/plugins/utils/apply-react-config.d.ts +0 -6
- package/src/plugins/utils/apply-react-config.d.ts.map +0 -1
- package/src/plugins/utils/apply-react-config.js +0 -51
- package/src/plugins/utils/apply-web-config.d.ts.map +0 -1
- package/src/plugins/utils/get-css-module-local-ident.d.ts.map +0 -1
- package/src/plugins/utils/get-non-buildable-libs.d.ts.map +0 -1
- package/src/plugins/utils/get-terser-ecma-version.d.ts.map +0 -1
- package/src/plugins/utils/get-transitive-deps.d.ts.map +0 -1
- package/src/plugins/utils/hash-format.d.ts.map +0 -1
- package/src/plugins/utils/instantiate-script-plugins.d.ts.map +0 -1
- package/src/plugins/utils/is-lib-buildable.d.ts.map +0 -1
- package/src/plugins/utils/loaders/stylesheet-loaders.d.ts.map +0 -1
- package/src/plugins/utils/models.d.ts.map +0 -1
- package/src/plugins/utils/normalize-entry.d.ts.map +0 -1
- package/src/plugins/utils/plugins/generate-package-json-plugin.d.ts.map +0 -1
- package/src/plugins/utils/plugins/normalize-options.d.ts.map +0 -1
- package/src/plugins/utils/plugins/nx-tsconfig-paths-rspack-plugin.d.ts.map +0 -1
- package/src/plugins/utils/plugins/postcss-cli-resources.d.ts.map +0 -1
- package/src/plugins/utils/plugins/rspack-nx-build-coordination-plugin.d.ts.map +0 -1
- package/src/plugins/utils/plugins/scripts-rspack-plugin.d.ts.map +0 -1
- package/src/plugins/utils/plugins/stats-json-plugin.d.ts.map +0 -1
- package/src/plugins/write-index-html-plugin.d.ts.map +0 -1
- package/src/utils/config.d.ts.map +0 -1
- package/src/utils/create-compiler.d.ts.map +0 -1
- package/src/utils/e2e-web-server-info-utils.d.ts +0 -3
- package/src/utils/e2e-web-server-info-utils.d.ts.map +0 -1
- package/src/utils/generator-utils.d.ts.map +0 -1
- package/src/utils/get-copy-patterns.d.ts.map +0 -1
- package/src/utils/has-plugin.d.ts.map +0 -1
- package/src/utils/jest-utils.d.ts.map +0 -1
- package/src/utils/mode-utils.d.ts.map +0 -1
- package/src/utils/model.d.ts.map +0 -1
- package/src/utils/normalize-assets.d.ts.map +0 -1
- package/src/utils/read-rspack-options.d.ts.map +0 -1
- package/src/utils/resolve-user-defined-rspack-config.d.ts.map +0 -1
- package/src/utils/versions.d.ts +0 -9
- package/src/utils/versions.d.ts.map +0 -1
- package/src/utils/versions.js +0 -11
- package/src/utils/webpack/interpolate-env-variables-to-index.d.ts.map +0 -1
- package/src/utils/webpack/normalize-entry.d.ts.map +0 -1
- package/src/utils/webpack/package-chunk-sort.d.ts.map +0 -1
- package/src/utils/with-nx.d.ts.map +0 -1
- package/src/utils/with-react.d.ts +0 -13
- package/src/utils/with-react.d.ts.map +0 -1
- package/src/utils/with-web.d.ts.map +0 -1
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{app-plugin.js → dist/app-plugin.js} +0 -0
- /package/{module-federation.js → dist/module-federation.js} +0 -0
- /package/{react-plugin.js → dist/react-plugin.js} +0 -0
- /package/{src → dist/src}/executors/dev-server/lib/get-dev-server-config.js +0 -0
- /package/{src → dist/src}/executors/dev-server/lib/serve-path.js +0 -0
- /package/{src → dist/src}/executors/dev-server/schema.d.ts +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-dev-server/schema.d.ts +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}/executors/rspack/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/ssr-dev-server/lib/wait-until-server-is-listening.js +0 -0
- /package/{src → dist/src}/executors/ssr-dev-server/schema.d.ts +0 -0
- /package/{src → dist/src}/executors/ssr-dev-server/schema.json +0 -0
- /package/{src → dist/src}/generators/configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/configuration/schema.json +0 -0
- /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/extract-rspack-options.js +0 -0
- /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/normalize-path-options.js +0 -0
- /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/utils.js +0 -0
- /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/validate-project.js +0 -0
- /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/schema.json +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/schema.json +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/utils/ast.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/utils/index.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/utils/types.js +0 -0
- /package/{src → dist/src}/generators/convert-webpack/lib/transform-cjs.js +0 -0
- /package/{src → dist/src}/generators/convert-webpack/lib/transform-esm.js +0 -0
- /package/{src → dist/src}/generators/convert-webpack/lib/transform-plugin-config.js +0 -0
- /package/{src → dist/src}/generators/convert-webpack/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/convert-webpack/schema.json +0 -0
- /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
- /package/{src → dist/src}/index.js +0 -0
- /package/{src → dist/src}/plugins/generate-package-json-plugin.js +0 -0
- /package/{src → dist/src}/plugins/nx-app-rspack-plugin/nx-app-rspack-plugin.js +0 -0
- /package/{src → dist/src}/plugins/nx-react-rspack-plugin/nx-react-rspack-plugin.js +0 -0
- /package/{src → dist/src}/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.js +0 -0
- /package/{src → dist/src}/plugins/utils/get-css-module-local-ident.js +0 -0
- /package/{src → dist/src}/plugins/utils/get-non-buildable-libs.js +0 -0
- /package/{src → dist/src}/plugins/utils/get-terser-ecma-version.js +0 -0
- /package/{src → dist/src}/plugins/utils/get-transitive-deps.js +0 -0
- /package/{src → dist/src}/plugins/utils/hash-format.js +0 -0
- /package/{src → dist/src}/plugins/utils/instantiate-script-plugins.js +0 -0
- /package/{src → dist/src}/plugins/utils/is-lib-buildable.js +0 -0
- /package/{src → dist/src}/plugins/utils/loaders/stylesheet-loaders.js +0 -0
- /package/{src → dist/src}/plugins/utils/models.js +0 -0
- /package/{src → dist/src}/plugins/utils/normalize-entry.js +0 -0
- /package/{src → dist/src}/plugins/utils/plugins/generate-package-json-plugin.js +0 -0
- /package/{src → dist/src}/plugins/utils/plugins/postcss-cli-resources.js +0 -0
- /package/{src → dist/src}/plugins/utils/plugins/rspack-nx-build-coordination-plugin.js +0 -0
- /package/{src → dist/src}/plugins/utils/plugins/scripts-rspack-plugin.js +0 -0
- /package/{src → dist/src}/plugins/utils/plugins/stats-json-plugin.js +0 -0
- /package/{src → dist/src}/plugins/write-index-html-plugin.js +0 -0
- /package/{src → dist/src}/utils/create-compiler.js +0 -0
- /package/{src → dist/src}/utils/get-copy-patterns.js +0 -0
- /package/{src → dist/src}/utils/has-plugin.js +0 -0
- /package/{src → dist/src}/utils/jest-utils.js +0 -0
- /package/{src → dist/src}/utils/mode-utils.js +0 -0
- /package/{src → dist/src}/utils/model.js +0 -0
- /package/{src → dist/src}/utils/normalize-assets.js +0 -0
- /package/{src → dist/src}/utils/read-rspack-options.js +0 -0
- /package/{src → dist/src}/utils/webpack/interpolate-env-variables-to-index.js +0 -0
- /package/{src → dist/src}/utils/webpack/normalize-entry.js +0 -0
- /package/{src → dist/src}/utils/webpack/package-chunk-sort.js +0 -0
package/dist/plugin.d.ts
ADDED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNodesV2 = exports.createDependencies = void 0;
|
|
3
|
+
exports.createNodesV2 = exports.createNodes = exports.createDependencies = void 0;
|
|
4
4
|
var plugin_1 = require("./src/plugins/plugin");
|
|
5
5
|
Object.defineProperty(exports, "createDependencies", { enumerable: true, get: function () { return plugin_1.createDependencies; } });
|
|
6
|
+
Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return plugin_1.createNodes; } });
|
|
6
7
|
Object.defineProperty(exports, "createNodesV2", { enumerable: true, get: function () { return plugin_1.createNodesV2; } });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<p style="text-align: center;">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
|
|
4
|
+
<img alt="Nx - Smart Monorepos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
{{links}}
|
|
9
|
+
|
|
10
|
+
<hr>
|
|
11
|
+
|
|
12
|
+
# Nx: Smart Monorepos · Fast Builds
|
|
13
|
+
|
|
14
|
+
Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
|
|
15
|
+
|
|
16
|
+
This package is a [Rspack plugin for Nx](https://nx.dev/nx-api/rspack).
|
|
17
|
+
|
|
18
|
+
{{content}}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = runExecutor;
|
|
4
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
6
|
-
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
6
|
+
const internal_2 = require("@nx/js/internal");
|
|
7
7
|
const dev_server_1 = require("@rspack/dev-server");
|
|
8
8
|
const create_compiler_1 = require("../../utils/create-compiler");
|
|
9
9
|
const mode_utils_1 = require("../../utils/mode-utils");
|
|
10
10
|
const normalize_options_1 = require("../rspack/lib/normalize-options");
|
|
11
11
|
const get_dev_server_config_1 = require("./lib/get-dev-server-config");
|
|
12
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
12
13
|
async function* runExecutor(options, context) {
|
|
14
|
+
(0, deprecation_1.warnRspackDevServerExecutorDeprecation)();
|
|
13
15
|
process.env.NODE_ENV ??= options.mode ?? 'development';
|
|
14
16
|
if ((0, mode_utils_1.isMode)(process.env.NODE_ENV)) {
|
|
15
17
|
options.mode = process.env.NODE_ENV;
|
|
@@ -19,7 +21,7 @@ async function* runExecutor(options, context) {
|
|
|
19
21
|
process.env.NX_BUILD_LIBS_FROM_SOURCE = `${buildOptions.buildLibsFromSource}`;
|
|
20
22
|
process.env.NX_BUILD_TARGET = options.buildTarget;
|
|
21
23
|
const metadata = context.projectsConfigurations.projects[context.projectName];
|
|
22
|
-
const sourceRoot = (0,
|
|
24
|
+
const sourceRoot = (0, internal_2.getProjectSourceRoot)(metadata);
|
|
23
25
|
const normalizedBuildOptions = (0, normalize_options_1.normalizeOptions)(buildOptions, context.root, metadata.root, sourceRoot);
|
|
24
26
|
let devServerConfig = (0, get_dev_server_config_1.getDevServerOptions)(context.root, options, normalizedBuildOptions);
|
|
25
27
|
const compiler = await (0, create_compiler_1.createCompiler)({
|
|
@@ -37,7 +39,7 @@ async function* runExecutor(options, context) {
|
|
|
37
39
|
...firstCompiler.options.devServer,
|
|
38
40
|
};
|
|
39
41
|
const baseUrl = `http://localhost:${devServerConfig.port ?? 4200}`;
|
|
40
|
-
return yield* (0,
|
|
42
|
+
return yield* (0, internal_1.createAsyncIterable)(({ next }) => {
|
|
41
43
|
const server = new dev_server_1.RspackDevServer({
|
|
42
44
|
...devServerConfig,
|
|
43
45
|
onListening: () => {
|
|
@@ -2,4 +2,3 @@ import type { Configuration as RspackDevServerConfiguration } from '@rspack/dev-
|
|
|
2
2
|
import { RspackExecutorSchema } from '../../rspack/schema';
|
|
3
3
|
import { DevServerExecutorSchema } from '../schema';
|
|
4
4
|
export declare function getDevServerOptions(root: string, serveOptions: DevServerExecutorSchema, buildOptions: RspackExecutorSchema): RspackDevServerConfiguration;
|
|
5
|
-
//# sourceMappingURL=get-dev-server-config.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { RspackExecutorSchema } from '../../rspack/schema';
|
|
2
2
|
export declare function buildServePath(browserOptions: RspackExecutorSchema): string;
|
|
3
3
|
export declare function _findDefaultServePath(baseHref?: string, deployUrl?: string): string | null;
|
|
4
|
-
//# sourceMappingURL=serve-path.d.ts.map
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"description": "Run @rspack/dev-server to serve a project.",
|
|
6
6
|
"continuous": true,
|
|
7
7
|
"type": "object",
|
|
8
|
+
"x-deprecated": "The `@nx/rspack:dev-server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rspack:convert-to-inferred` to migrate to the `@nx/rspack/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
8
9
|
"properties": {
|
|
9
10
|
"buildTarget": {
|
|
10
11
|
"type": "string",
|
|
@@ -2,4 +2,3 @@ import { ExecutorContext } from '@nx/devkit';
|
|
|
2
2
|
import { ModuleFederationDevServerOptions, NormalizedModuleFederationDevServerOptions } from '../schema';
|
|
3
3
|
export declare function getBuildOptions(buildTarget: string, context: ExecutorContext): any;
|
|
4
4
|
export declare function normalizeOptions(options: ModuleFederationDevServerOptions): NormalizedModuleFederationDevServerOptions;
|
|
5
|
-
//# sourceMappingURL=normalize-options.d.ts.map
|
|
@@ -3,4 +3,3 @@ import { ProjectConfiguration, ExecutorContext } from '@nx/devkit';
|
|
|
3
3
|
export declare function startRemotes(remotes: string[], workspaceProjects: Record<string, ProjectConfiguration>, options: Partial<Pick<ModuleFederationDevServerOptions, 'devRemotes' | 'host' | 'ssl' | 'sslCert' | 'sslKey' | 'verbose'>>, context: ExecutorContext, target?: 'serve' | 'serve-static'): Promise<AsyncIterable<{
|
|
4
4
|
success: boolean;
|
|
5
5
|
}>[]>;
|
|
6
|
-
//# sourceMappingURL=start-remotes.d.ts.map
|
package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.js
RENAMED
|
@@ -3,19 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = moduleFederationDevServer;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
|
+
const internal_2 = require("@nx/js/internal");
|
|
8
|
+
const internal_3 = require("@nx/module-federation/internal");
|
|
9
|
+
const internal_4 = require("@nx/web/internal");
|
|
11
10
|
const fs_1 = require("fs");
|
|
12
11
|
const path_1 = require("path");
|
|
13
12
|
const dev_server_impl_1 = tslib_1.__importDefault(require("../dev-server/dev-server.impl"));
|
|
14
13
|
const lib_1 = require("./lib");
|
|
14
|
+
const module_federation_deprecation_1 = require("../../utils/module-federation-deprecation");
|
|
15
15
|
async function* moduleFederationDevServer(schema, context) {
|
|
16
|
+
(0, module_federation_deprecation_1.warnRspackMfDevServerExecutorDeprecation)();
|
|
16
17
|
const options = (0, lib_1.normalizeOptions)(schema);
|
|
17
18
|
const currIter = options.static
|
|
18
|
-
? (0,
|
|
19
|
+
? (0, internal_4.fileServerExecutor)({
|
|
19
20
|
...options,
|
|
20
21
|
parallel: false,
|
|
21
22
|
withDeps: false,
|
|
@@ -25,7 +26,7 @@ async function* moduleFederationDevServer(schema, context) {
|
|
|
25
26
|
}, context)
|
|
26
27
|
: (0, dev_server_impl_1.default)(options, context);
|
|
27
28
|
const p = context.projectsConfigurations.projects[context.projectName];
|
|
28
|
-
let pathToManifestFile = (0, path_1.join)(context.root, (0,
|
|
29
|
+
let pathToManifestFile = (0, path_1.join)(context.root, (0, internal_2.getProjectSourceRoot)(p), 'assets/module-federation.manifest.json');
|
|
29
30
|
if (options.pathToManifestFile) {
|
|
30
31
|
const userPathToManifestFile = (0, path_1.join)(context.root, options.pathToManifestFile);
|
|
31
32
|
if (!(0, fs_1.existsSync)(userPathToManifestFile)) {
|
|
@@ -39,8 +40,8 @@ async function* moduleFederationDevServer(schema, context) {
|
|
|
39
40
|
if (!options.isInitialHost) {
|
|
40
41
|
return yield* currIter;
|
|
41
42
|
}
|
|
42
|
-
const { staticRemotesIter, devRemoteIters, remotes } = await (0,
|
|
43
|
-
return yield* (0,
|
|
43
|
+
const { staticRemotesIter, devRemoteIters, remotes } = await (0, internal_3.startRemoteIterators)(options, context, lib_1.startRemotes, pathToManifestFile, 'react');
|
|
44
|
+
return yield* (0, internal_1.combineAsyncIterables)(currIter, ...devRemoteIters, ...(staticRemotesIter ? [staticRemotesIter] : []), (0, internal_1.createAsyncIterable)(async ({ next, done }) => {
|
|
44
45
|
if (!options.isInitialHost) {
|
|
45
46
|
done();
|
|
46
47
|
return;
|
|
@@ -55,7 +56,7 @@ async function* moduleFederationDevServer(schema, context) {
|
|
|
55
56
|
const portsToWaitFor = staticRemotesIter && options.staticRemotesPort
|
|
56
57
|
? [options.staticRemotesPort, ...remotes.remotePorts]
|
|
57
58
|
: [...remotes.remotePorts];
|
|
58
|
-
await Promise.all(portsToWaitFor.map((port) => (0,
|
|
59
|
+
await Promise.all(portsToWaitFor.map((port) => (0, internal_4.waitForPortOpen)(port, {
|
|
59
60
|
retries: 480,
|
|
60
61
|
retryDelay: 2500,
|
|
61
62
|
host: host,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"continuous": true,
|
|
4
4
|
"outputCapture": "direct-nodejs",
|
|
5
5
|
"title": "Rspack Module Federation Dev Server",
|
|
6
|
+
"x-deprecated": "The `@nx/rspack:module-federation-dev-server` executor is deprecated. Dynamic federation in `@nx/react:consumer` removes the need for host-orchestrated remote serving. Removed in Nx v24.",
|
|
6
7
|
"description": "Serve a module federation application.",
|
|
7
8
|
"cli": "nx",
|
|
8
9
|
"type": "object",
|
package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts
RENAMED
|
@@ -2,4 +2,3 @@ import { ModuleFederationSsrDevServerOptions, NormalizedModuleFederationSsrDevSe
|
|
|
2
2
|
import { ExecutorContext } from '@nx/devkit';
|
|
3
3
|
export declare function normalizeOptions(options: ModuleFederationSsrDevServerOptions): NormalizedModuleFederationSsrDevServerOptions;
|
|
4
4
|
export declare function getBuildOptions(buildTarget: string, context: ExecutorContext): any;
|
|
5
|
-
//# sourceMappingURL=normalize-options.d.ts.map
|
|
@@ -3,4 +3,3 @@ import { ExecutorContext, ProjectConfiguration } from '@nx/devkit';
|
|
|
3
3
|
export declare function startRemotes(remotes: string[], workspaceProjects: Record<string, ProjectConfiguration>, options: Partial<Pick<ModuleFederationSsrDevServerOptions, 'devRemotes' | 'host' | 'ssl' | 'sslCert' | 'sslKey' | 'verbose'>>, context: ExecutorContext): Promise<AsyncIterable<{
|
|
4
4
|
success: boolean;
|
|
5
5
|
}>[]>;
|
|
6
|
-
//# sourceMappingURL=start-remotes.d.ts.map
|
|
@@ -3,4 +3,3 @@ import { ModuleFederationSsrDevServerOptions } from './schema';
|
|
|
3
3
|
export default function moduleFederationSsrDevServer(ssrDevServerOptions: ModuleFederationSsrDevServerOptions, context: ExecutorContext): AsyncGenerator<{
|
|
4
4
|
success: boolean;
|
|
5
5
|
}, any, any>;
|
|
6
|
-
//# sourceMappingURL=module-federation-ssr-dev-server.impl.d.ts.map
|
|
@@ -3,19 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = moduleFederationSsrDevServer;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
6
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
7
|
+
const internal_2 = require("@nx/js/internal");
|
|
8
|
+
const internal_3 = require("@nx/module-federation/internal");
|
|
9
|
+
const internal_4 = require("@nx/web/internal");
|
|
10
10
|
const fs_1 = require("fs");
|
|
11
11
|
const path_1 = require("path");
|
|
12
12
|
const ssr_dev_server_impl_1 = tslib_1.__importDefault(require("../ssr-dev-server/ssr-dev-server.impl"));
|
|
13
13
|
const lib_1 = require("./lib");
|
|
14
|
+
const module_federation_deprecation_1 = require("../../utils/module-federation-deprecation");
|
|
14
15
|
async function* moduleFederationSsrDevServer(ssrDevServerOptions, context) {
|
|
16
|
+
(0, module_federation_deprecation_1.warnRspackMfSsrDevServerExecutorDeprecation)();
|
|
15
17
|
const options = (0, lib_1.normalizeOptions)(ssrDevServerOptions);
|
|
16
18
|
const iter = (0, ssr_dev_server_impl_1.default)(options, context);
|
|
17
19
|
const projectConfig = context.projectsConfigurations.projects[context.projectName];
|
|
18
|
-
let pathToManifestFile = (0, path_1.join)(context.root, (0,
|
|
20
|
+
let pathToManifestFile = (0, path_1.join)(context.root, (0, internal_2.getProjectSourceRoot)(projectConfig), 'assets/module-federation.manifest.json');
|
|
19
21
|
if (options.pathToManifestFile) {
|
|
20
22
|
const userPathToManifestFile = (0, path_1.join)(context.root, options.pathToManifestFile);
|
|
21
23
|
if (!(0, fs_1.existsSync)(userPathToManifestFile)) {
|
|
@@ -29,8 +31,8 @@ async function* moduleFederationSsrDevServer(ssrDevServerOptions, context) {
|
|
|
29
31
|
if (!options.isInitialHost) {
|
|
30
32
|
return yield* iter;
|
|
31
33
|
}
|
|
32
|
-
const { staticRemotesIter, devRemoteIters, remotes } = await (0,
|
|
33
|
-
return yield* (0,
|
|
34
|
+
const { staticRemotesIter, devRemoteIters, remotes } = await (0, internal_3.startRemoteIterators)(options, context, lib_1.startRemotes, pathToManifestFile, 'react', true);
|
|
35
|
+
return yield* (0, internal_1.combineAsyncIterables)(iter, ...devRemoteIters, ...(staticRemotesIter ? [staticRemotesIter] : []), (0, internal_1.createAsyncIterable)(async ({ next, done }) => {
|
|
34
36
|
if (!options.isInitialHost) {
|
|
35
37
|
done();
|
|
36
38
|
return;
|
|
@@ -45,7 +47,7 @@ async function* moduleFederationSsrDevServer(ssrDevServerOptions, context) {
|
|
|
45
47
|
const portsToWaitFor = staticRemotesIter && options.staticRemotesPort
|
|
46
48
|
? [options.staticRemotesPort, ...remotes.remotePorts]
|
|
47
49
|
: [...remotes.remotePorts];
|
|
48
|
-
await Promise.all(portsToWaitFor.map((port) => (0,
|
|
50
|
+
await Promise.all(portsToWaitFor.map((port) => (0, internal_4.waitForPortOpen)(port, {
|
|
49
51
|
retries: 480,
|
|
50
52
|
retryDelay: 2500,
|
|
51
53
|
host,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DevRemoteDefinition } from '@nx/module-federation/
|
|
1
|
+
import { DevRemoteDefinition } from '@nx/module-federation/internal';
|
|
2
2
|
import { RspackSsrDevServerOptions } from '../ssr-dev-server/schema';
|
|
3
3
|
|
|
4
4
|
export type ModuleFederationSsrDevServerOptions = RspackSsrDevServerOptions & {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"continuous": true,
|
|
4
4
|
"outputCapture": "direct-nodejs",
|
|
5
5
|
"title": "Module Federation SSR Dev Server",
|
|
6
|
+
"x-deprecated": "The `@nx/rspack:module-federation-ssr-dev-server` executor is deprecated. SSR is not first-classed in the new `@nx/react:consumer`/`@nx/react:provider` generators. Removed in Nx v24.",
|
|
6
7
|
"description": "Serve a SSR Consumer (host) application along with its known Producers (remotes).",
|
|
7
8
|
"cli": "nx",
|
|
8
9
|
"type": "object",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StaticRemotesConfig } from '@nx/module-federation/
|
|
1
|
+
import { StaticRemotesConfig } from '@nx/module-federation/internal';
|
|
2
2
|
import { ExecutorContext } from 'nx/src/config/misc-interfaces';
|
|
3
3
|
import { ModuleFederationDevServerOptions } from '../module-federation-dev-server/schema';
|
|
4
4
|
import { ModuleFederationStaticServerSchema } from './schema';
|
|
@@ -10,4 +10,3 @@ export default function moduleFederationStaticServer(schema: ModuleFederationSta
|
|
|
10
10
|
success: boolean;
|
|
11
11
|
baseUrl: string;
|
|
12
12
|
}, any, any>;
|
|
13
|
-
//# sourceMappingURL=module-federation-static-server.impl.d.ts.map
|
|
@@ -2,23 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startProxies = startProxies;
|
|
4
4
|
exports.default = moduleFederationStaticServer;
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const utils_2 = require("@nx/module-federation/src/utils");
|
|
11
|
-
const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
|
|
12
|
-
const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
|
|
7
|
+
const internal_2 = require("@nx/js/internal");
|
|
8
|
+
const internal_3 = require("@nx/module-federation/internal");
|
|
9
|
+
const internal_4 = require("@nx/web/internal");
|
|
13
10
|
const child_process_1 = require("child_process");
|
|
14
11
|
const fs_1 = require("fs");
|
|
15
12
|
const path_1 = require("path");
|
|
13
|
+
const module_federation_deprecation_1 = require("../../utils/module-federation-deprecation");
|
|
16
14
|
function getBuildAndServeOptionsFromServeTarget(serveTarget, context) {
|
|
17
15
|
const target = (0, devkit_1.parseTargetString)(serveTarget, context);
|
|
18
16
|
const serveOptions = (0, devkit_1.readTargetOptions)(target, context);
|
|
19
17
|
const buildTarget = (0, devkit_1.parseTargetString)(serveOptions.buildTarget, context);
|
|
20
18
|
const buildOptions = (0, devkit_1.readTargetOptions)(buildTarget, context);
|
|
21
|
-
let pathToManifestFile = (0, path_1.join)(context.root, (0,
|
|
19
|
+
let pathToManifestFile = (0, path_1.join)(context.root, (0, internal_2.getProjectSourceRoot)(context.projectGraph.nodes[context.projectName].data), 'assets/module-federation.manifest.json');
|
|
22
20
|
if (serveOptions.pathToManifestFile) {
|
|
23
21
|
const userPathToManifestFile = (0, path_1.join)(context.root, serveOptions.pathToManifestFile);
|
|
24
22
|
if (!(0, fs_1.existsSync)(userPathToManifestFile)) {
|
|
@@ -159,20 +157,21 @@ function startProxies(staticRemotesConfig, hostServeOptions, mappedLocationOfHos
|
|
|
159
157
|
devkit_1.logger.info('NX Static host proxy started successfully');
|
|
160
158
|
}
|
|
161
159
|
async function* moduleFederationStaticServer(schema, context) {
|
|
160
|
+
(0, module_federation_deprecation_1.warnRspackMfStaticServerExecutorDeprecation)();
|
|
162
161
|
// Force Node to resolve to look for the nx binary that is inside node_modules
|
|
163
162
|
const nxBin = require.resolve('nx/bin/nx');
|
|
164
163
|
// Get the remotes from the module federation config
|
|
165
164
|
const p = context.projectsConfigurations.projects[context.projectName];
|
|
166
165
|
const options = getBuildAndServeOptionsFromServeTarget(schema.serveTarget, context);
|
|
167
|
-
const moduleFederationConfig = (0,
|
|
168
|
-
const remotes = (0,
|
|
166
|
+
const moduleFederationConfig = (0, internal_3.getModuleFederationConfig)(options.buildOptions.tsConfig, context.root, p.root, 'react');
|
|
167
|
+
const remotes = (0, internal_3.getRemotes)([], options.serveOptions.skipRemotes, moduleFederationConfig, {
|
|
169
168
|
projectName: context.projectName,
|
|
170
169
|
projectGraph: context.projectGraph,
|
|
171
170
|
root: context.root,
|
|
172
171
|
}, options.pathToManifestFile);
|
|
173
|
-
const staticRemotesConfig = (0,
|
|
172
|
+
const staticRemotesConfig = (0, internal_3.parseStaticRemotesConfig)([...remotes.staticRemotes, ...remotes.dynamicRemotes], context);
|
|
174
173
|
options.serveOptions.staticRemotesPort ??= remotes.staticRemotePort;
|
|
175
|
-
const mappedLocationsOfStaticRemotes = await (0,
|
|
174
|
+
const mappedLocationsOfStaticRemotes = await (0, internal_3.buildStaticRemotes)(staticRemotesConfig, nxBin, context, options.serveOptions);
|
|
176
175
|
// Build the host
|
|
177
176
|
const hostUrlSegment = (0, path_1.basename)(options.buildOptions.outputPath);
|
|
178
177
|
const mappedLocationOfHost = `http${options.serveOptions.ssl ? 's' : ''}://${options.serveOptions.host}:${options.serveOptions.staticRemotesPort}/${hostUrlSegment}`;
|
|
@@ -180,7 +179,7 @@ async function* moduleFederationStaticServer(schema, context) {
|
|
|
180
179
|
// Move to a temporary directory
|
|
181
180
|
const commonOutputDirectory = moveToTmpDirectory(staticRemotesConfig, options.buildOptions.outputPath, hostUrlSegment);
|
|
182
181
|
// File Serve the temporary directory
|
|
183
|
-
const staticFileServerIter = (0,
|
|
182
|
+
const staticFileServerIter = (0, internal_4.fileServerExecutor)({
|
|
184
183
|
cors: true,
|
|
185
184
|
watch: false,
|
|
186
185
|
staticFilePath: commonOutputDirectory,
|
|
@@ -201,12 +200,12 @@ async function* moduleFederationStaticServer(schema, context) {
|
|
|
201
200
|
pathToKey: (0, path_1.join)(devkit_1.workspaceRoot, options.serveOptions.sslKey),
|
|
202
201
|
}
|
|
203
202
|
: undefined);
|
|
204
|
-
return yield* (0,
|
|
203
|
+
return yield* (0, internal_1.combineAsyncIterables)(staticFileServerIter, (0, internal_1.createAsyncIterable)(async ({ next, done }) => {
|
|
205
204
|
const host = options.serveOptions.host ?? 'localhost';
|
|
206
205
|
const baseUrl = `http${options.serveOptions.ssl ? 's' : ''}://${host}:${options.serveOptions.port}`;
|
|
207
206
|
if (remotes.remotePorts.length === 0) {
|
|
208
207
|
const portsToWaitFor = [options.serveOptions.staticRemotesPort];
|
|
209
|
-
await Promise.all(portsToWaitFor.map((port) => (0,
|
|
208
|
+
await Promise.all(portsToWaitFor.map((port) => (0, internal_4.waitForPortOpen)(port, {
|
|
210
209
|
retries: 480,
|
|
211
210
|
retryDelay: 2500,
|
|
212
211
|
host: host,
|
|
@@ -220,7 +219,7 @@ async function* moduleFederationStaticServer(schema, context) {
|
|
|
220
219
|
const portsToWaitFor = staticFileServerIter && options.serveOptions.staticRemotesPort
|
|
221
220
|
? [options.serveOptions.staticRemotesPort, ...remotes.remotePorts]
|
|
222
221
|
: [...remotes.remotePorts];
|
|
223
|
-
await Promise.all(portsToWaitFor.map((port) => (0,
|
|
222
|
+
await Promise.all(portsToWaitFor.map((port) => (0, internal_4.waitForPortOpen)(port, {
|
|
224
223
|
retries: 480,
|
|
225
224
|
retryDelay: 2500,
|
|
226
225
|
host: host,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"continuous": true,
|
|
4
4
|
"outputCapture": "direct-nodejs",
|
|
5
5
|
"title": "Module Federation Static Dev Server",
|
|
6
|
+
"x-deprecated": "The `@nx/rspack:module-federation-static-server` executor is deprecated. Use `vite preview` / `rsbuild preview` via `nx:run-commands` instead. Removed in Nx v24.",
|
|
6
7
|
"description": "Serve a Consumer (host) application statically along with it's Producers (remotes).",
|
|
7
8
|
"cli": "nx",
|
|
8
9
|
"type": "object",
|
|
@@ -4,4 +4,3 @@ import { type NormalizedRspackExecutorSchema } from '../schema';
|
|
|
4
4
|
export declare function getRspackConfigs(options: NormalizedRspackExecutorSchema & {
|
|
5
5
|
devServer?: any;
|
|
6
6
|
}, context: ExecutorContext): Promise<Configuration | Configuration[]>;
|
|
7
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRspackConfigs = getRspackConfigs;
|
|
4
4
|
const config_1 = require("../../../utils/config");
|
|
5
|
+
const deprecation_1 = require("../../../utils/deprecation");
|
|
5
6
|
const resolve_user_defined_rspack_config_1 = require("../../../utils/resolve-user-defined-rspack-config");
|
|
6
7
|
const with_nx_1 = require("../../../utils/with-nx");
|
|
7
8
|
const with_web_1 = require("../../../utils/with-web");
|
|
@@ -15,9 +16,11 @@ async function getRspackConfigs(options, context) {
|
|
|
15
16
|
if (typeof userDefinedConfig.then === 'function') {
|
|
16
17
|
userDefinedConfig = await userDefinedConfig;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
// Nx composes these helpers internally to build the default config; suppress
|
|
20
|
+
// their deprecation warning so it fires only for user-authored configs.
|
|
21
|
+
const config = (0, deprecation_1.suppressRspackComposeHelperWarnings)(() => (options.target === 'web'
|
|
19
22
|
? (0, config_1.composePluginsSync)((0, with_nx_1.withNx)(options), (0, with_web_1.withWeb)(options))
|
|
20
|
-
: (0, with_nx_1.withNx)(options))({}, { options, context });
|
|
23
|
+
: (0, with_nx_1.withNx)(options))({}, { options, context }));
|
|
21
24
|
if (typeof userDefinedConfig === 'function' &&
|
|
22
25
|
((0, config_1.isNxRspackComposablePlugin)(userDefinedConfig) ||
|
|
23
26
|
!options.standardRspackConfigFunction)) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { RspackExecutorSchema, NormalizedRspackExecutorSchema } from '../schema';
|
|
2
2
|
export declare function normalizeOptions(options: RspackExecutorSchema, root: string, projectRoot: string, sourceRoot: string): NormalizedRspackExecutorSchema;
|
|
3
3
|
export declare function normalizePluginPath(pluginPath: void | string, root: string): string;
|
|
4
|
-
//# sourceMappingURL=normalize-options.d.ts.map
|
|
@@ -4,11 +4,11 @@ exports.normalizeOptions = normalizeOptions;
|
|
|
4
4
|
exports.normalizePluginPath = normalizePluginPath;
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const normalize_options_1 = require("../../../plugins/utils/plugins/normalize-options");
|
|
7
|
-
const
|
|
7
|
+
const internal_1 = require("@nx/js/internal");
|
|
8
8
|
function normalizeOptions(options, root, projectRoot, sourceRoot) {
|
|
9
9
|
const normalizedOptions = {
|
|
10
10
|
...options,
|
|
11
|
-
useTsconfigPaths: !(0,
|
|
11
|
+
useTsconfigPaths: !(0, internal_1.isUsingTsSolutionSetup)(),
|
|
12
12
|
root,
|
|
13
13
|
projectRoot,
|
|
14
14
|
sourceRoot,
|
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = runExecutor;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
6
6
|
const js_1 = require("@nx/js");
|
|
7
|
-
const
|
|
7
|
+
const internal_2 = require("@nx/js/internal");
|
|
8
8
|
const core_1 = require("@rspack/core");
|
|
9
9
|
const path_1 = require("path");
|
|
10
10
|
const create_compiler_1 = require("../../utils/create-compiler");
|
|
11
11
|
const mode_utils_1 = require("../../utils/mode-utils");
|
|
12
12
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
13
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
13
14
|
async function* runExecutor(options, context) {
|
|
15
|
+
(0, deprecation_1.warnRspackExecutorDeprecation)();
|
|
14
16
|
process.env.NODE_ENV ??= options.mode ?? 'production';
|
|
15
17
|
options.target ??= 'web';
|
|
16
18
|
const metadata = context.projectsConfigurations.projects[context.projectName];
|
|
17
|
-
const sourceRoot = (0,
|
|
19
|
+
const sourceRoot = (0, internal_2.getProjectSourceRoot)(metadata);
|
|
18
20
|
const normalizedOptions = (0, normalize_options_1.normalizeOptions)(options, context.root, metadata.root, sourceRoot);
|
|
19
21
|
if ((0, mode_utils_1.isMode)(process.env.NODE_ENV)) {
|
|
20
22
|
normalizedOptions.mode = process.env.NODE_ENV;
|
|
@@ -23,7 +25,7 @@ async function* runExecutor(options, context) {
|
|
|
23
25
|
await executeTypeCheck(normalizedOptions, context);
|
|
24
26
|
}
|
|
25
27
|
const compiler = await (0, create_compiler_1.createCompiler)(normalizedOptions, context);
|
|
26
|
-
const iterable = (0,
|
|
28
|
+
const iterable = (0, internal_1.createAsyncIterable)(async ({ next, done }) => {
|
|
27
29
|
const watch = (compiler instanceof core_1.Compiler
|
|
28
30
|
? compiler.options.watch
|
|
29
31
|
: compiler.options[0].watch) ?? options.watch;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"title": "Rspack build executor",
|
|
5
5
|
"description": "Run Rspack via an executor for a project.",
|
|
6
6
|
"type": "object",
|
|
7
|
+
"x-deprecated": "The `@nx/rspack:rspack` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rspack:convert-to-inferred` to migrate to the `@nx/rspack/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
7
8
|
"properties": {
|
|
8
9
|
"target": {
|
|
9
10
|
"type": "string",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ssrDevServerExecutor = ssrDevServerExecutor;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
|
|
7
7
|
const pc = tslib_1.__importStar(require("picocolors"));
|
|
8
8
|
const wait_until_server_is_listening_1 = require("./lib/wait-until-server-is-listening");
|
|
9
9
|
async function* ssrDevServerExecutor(options, context) {
|
|
@@ -15,7 +15,7 @@ async function* ssrDevServerExecutor(options, context) {
|
|
|
15
15
|
const runServer = await (0, devkit_1.runExecutor)(serverTarget, { ...serverOptions, ...options.serverTargetOptions }, context);
|
|
16
16
|
let browserBuilt = false;
|
|
17
17
|
let nodeStarted = false;
|
|
18
|
-
const combined = (0,
|
|
18
|
+
const combined = (0, internal_1.combineAsyncIterables)(runBrowser, runServer);
|
|
19
19
|
for await (const output of combined) {
|
|
20
20
|
if (!output.success)
|
|
21
21
|
throw new Error('Could not build application');
|
|
@@ -2,4 +2,3 @@ import { Tree } from '@nx/devkit';
|
|
|
2
2
|
import { ConfigurationSchema } from './schema';
|
|
3
3
|
export declare function configurationGenerator(tree: Tree, options: ConfigurationSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
4
4
|
export default configurationGenerator;
|
|
5
|
-
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -6,19 +6,14 @@ const devkit_1 = require("@nx/devkit");
|
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const generator_utils_1 = require("../../utils/generator-utils");
|
|
8
8
|
const init_1 = tslib_1.__importDefault(require("../init/init"));
|
|
9
|
-
const
|
|
9
|
+
const internal_1 = require("@nx/js/internal");
|
|
10
|
+
const deprecation_1 = require("../../utils/deprecation");
|
|
11
|
+
const assert_supported_rspack_version_1 = require("../../utils/assert-supported-rspack-version");
|
|
10
12
|
function projectIsRootProjectInStandaloneWorkspace(projectRoot) {
|
|
11
13
|
return (0, path_1.relative)(devkit_1.workspaceRoot, projectRoot).length === 0;
|
|
12
14
|
}
|
|
13
15
|
function editTsConfig(tree, projectRoot, framework, relativePathToRootTsConfig) {
|
|
14
|
-
|
|
15
|
-
let shared;
|
|
16
|
-
try {
|
|
17
|
-
shared = require('@nx/js/src/utils/typescript/create-ts-config');
|
|
18
|
-
}
|
|
19
|
-
catch {
|
|
20
|
-
shared = require('@nx/workspace/src/utils/create-ts-config');
|
|
21
|
-
}
|
|
16
|
+
const shared = require('@nx/js');
|
|
22
17
|
if (framework === 'react') {
|
|
23
18
|
const json = {
|
|
24
19
|
compilerOptions: {
|
|
@@ -52,6 +47,7 @@ function editTsConfig(tree, projectRoot, framework, relativePathToRootTsConfig)
|
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
49
|
async function configurationGenerator(tree, options) {
|
|
50
|
+
(0, assert_supported_rspack_version_1.assertSupportedRspackVersion)(tree);
|
|
55
51
|
const task = await (0, init_1.default)(tree, {
|
|
56
52
|
...options,
|
|
57
53
|
});
|
|
@@ -76,7 +72,7 @@ async function configurationGenerator(tree, options) {
|
|
|
76
72
|
projectAlreadyHasRspackTargets = alreadyHasNxRspackTargets;
|
|
77
73
|
if (alreadyHasNxRspackTargets.build &&
|
|
78
74
|
(alreadyHasNxRspackTargets.serve ||
|
|
79
|
-
(0,
|
|
75
|
+
(0, internal_1.getProjectType)(tree, options.project, projectType) === 'library' ||
|
|
80
76
|
options.framework === 'nest')) {
|
|
81
77
|
throw new Error(`The project ${options.project} is already configured to use the @nx/rspack executors.
|
|
82
78
|
Please try a different project, or remove the existing targets
|
|
@@ -106,6 +102,13 @@ async function configurationGenerator(tree, options) {
|
|
|
106
102
|
(0, generator_utils_1.deleteWebpackConfig)(tree, root, targets?.[buildTargetName]?.options?.webpackConfig);
|
|
107
103
|
editTsConfig(tree, root, options.framework, (0, devkit_1.joinPathFragments)((0, devkit_1.offsetFromRoot)(root), 'tsconfig.base.json'));
|
|
108
104
|
}
|
|
105
|
+
const willScaffoldExecutorTargets = !projectAlreadyHasRspackTargets.build ||
|
|
106
|
+
((options.framework !== 'none' || options.devServer) &&
|
|
107
|
+
options.framework !== 'nest' &&
|
|
108
|
+
!projectAlreadyHasRspackTargets.serve);
|
|
109
|
+
if (willScaffoldExecutorTargets) {
|
|
110
|
+
(0, deprecation_1.warnRspackExecutorGenerating)();
|
|
111
|
+
}
|
|
109
112
|
if (!projectAlreadyHasRspackTargets.build) {
|
|
110
113
|
(0, generator_utils_1.addOrChangeBuildTarget)(tree, options, buildTargetName);
|
|
111
114
|
}
|