@nx/rspack 23.0.0-pr.35465.2bc2643 → 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.
Files changed (312) hide show
  1. package/{app-plugin.d.ts → dist/app-plugin.d.ts} +0 -1
  2. package/{module-federation.d.ts → dist/module-federation.d.ts} +0 -1
  3. package/dist/plugin.d.ts +2 -0
  4. package/{plugin.js → dist/plugin.js} +2 -1
  5. package/{react-plugin.d.ts → dist/react-plugin.d.ts} +0 -1
  6. package/dist/readme-template.md +18 -0
  7. package/{src → dist/src}/executors/dev-server/dev-server.impl.d.ts +0 -1
  8. package/{src → dist/src}/executors/dev-server/dev-server.impl.js +6 -4
  9. package/{src → dist/src}/executors/dev-server/lib/get-dev-server-config.d.ts +0 -1
  10. package/{src → dist/src}/executors/dev-server/lib/serve-path.d.ts +0 -1
  11. package/{src → dist/src}/executors/dev-server/schema.json +1 -0
  12. package/{src → dist/src}/executors/module-federation-dev-server/lib/index.d.ts +0 -1
  13. package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -1
  14. package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.d.ts +0 -1
  15. package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -1
  16. package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.js +11 -10
  17. package/{src → dist/src}/executors/module-federation-dev-server/schema.json +1 -0
  18. package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.d.ts +0 -1
  19. package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -1
  20. package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts +0 -1
  21. package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -1
  22. package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +10 -8
  23. package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.d.ts +1 -1
  24. package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.json +1 -0
  25. package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.d.ts +1 -2
  26. package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.js +15 -16
  27. package/{src → dist/src}/executors/module-federation-static-server/schema.json +1 -0
  28. package/{src → dist/src}/executors/rspack/lib/config.d.ts +0 -1
  29. package/{src → dist/src}/executors/rspack/lib/config.js +5 -2
  30. package/{src → dist/src}/executors/rspack/lib/normalize-options.d.ts +0 -1
  31. package/{src → dist/src}/executors/rspack/lib/normalize-options.js +2 -2
  32. package/{src → dist/src}/executors/rspack/rspack.impl.d.ts +0 -1
  33. package/{src → dist/src}/executors/rspack/rspack.impl.js +6 -4
  34. package/{src → dist/src}/executors/rspack/schema.json +1 -0
  35. package/{src → dist/src}/executors/ssr-dev-server/lib/wait-until-server-is-listening.d.ts +0 -1
  36. package/{src → dist/src}/executors/ssr-dev-server/ssr-dev-server.impl.d.ts +0 -1
  37. package/{src → dist/src}/executors/ssr-dev-server/ssr-dev-server.impl.js +2 -2
  38. package/{src → dist/src}/generators/configuration/configuration.d.ts +0 -1
  39. package/{src → dist/src}/generators/configuration/configuration.js +13 -10
  40. package/{src → dist/src}/generators/convert-config-to-rspack-plugin/convert-config-to-rspack-plugin.d.ts +0 -1
  41. package/{src → dist/src}/generators/convert-config-to-rspack-plugin/convert-config-to-rspack-plugin.js +5 -7
  42. package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/extract-rspack-options.d.ts +0 -1
  43. package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/normalize-path-options.d.ts +0 -1
  44. package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/utils.d.ts +0 -1
  45. package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/validate-project.d.ts +0 -1
  46. package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.d.ts +0 -1
  47. package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.js +13 -6
  48. package/{src → dist/src}/generators/convert-to-inferred/utils/ast.d.ts +0 -1
  49. package/{src → dist/src}/generators/convert-to-inferred/utils/build-post-target-transformer.d.ts +0 -1
  50. package/{src → dist/src}/generators/convert-to-inferred/utils/build-post-target-transformer.js +8 -8
  51. package/{src → dist/src}/generators/convert-to-inferred/utils/index.d.ts +0 -1
  52. package/{src → dist/src}/generators/convert-to-inferred/utils/serve-post-target-transformer.d.ts +0 -1
  53. package/{src → dist/src}/generators/convert-to-inferred/utils/serve-post-target-transformer.js +4 -4
  54. package/{src → dist/src}/generators/convert-to-inferred/utils/types.d.ts +1 -2
  55. package/{src → dist/src}/generators/convert-webpack/convert-webpack.d.ts +0 -1
  56. package/{src → dist/src}/generators/convert-webpack/convert-webpack.js +8 -1
  57. package/{src → dist/src}/generators/convert-webpack/lib/transform-cjs.d.ts +0 -1
  58. package/{src → dist/src}/generators/convert-webpack/lib/transform-esm.d.ts +0 -1
  59. package/{src → dist/src}/generators/convert-webpack/lib/transform-plugin-config.d.ts +0 -1
  60. package/{src → dist/src}/generators/init/init.d.ts +0 -1
  61. package/{src → dist/src}/generators/init/init.js +16 -10
  62. package/{src → dist/src}/generators/init/schema.json +1 -1
  63. package/{src → dist/src}/index.d.ts +0 -1
  64. package/{src → dist/src}/migrations/update-22-0-0/remove-deprecated-options.d.ts +0 -1
  65. package/{src → dist/src}/migrations/update-22-0-0/remove-deprecated-options.js +3 -3
  66. package/dist/src/migrations/update-23-0-0/add-svgr-to-rspack-config.d.ts +2 -0
  67. package/dist/src/migrations/update-23-0-0/add-svgr-to-rspack-config.js +413 -0
  68. package/dist/src/migrations/update-23-0-0/add-svgr-to-rspack-config.md +84 -0
  69. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
  70. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +223 -0
  71. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
  72. package/{src → dist/src}/plugins/generate-package-json-plugin.d.ts +0 -1
  73. package/{src → dist/src}/plugins/nx-app-rspack-plugin/nx-app-rspack-plugin.d.ts +0 -1
  74. package/dist/src/plugins/nx-react-rspack-plugin/nx-react-rspack-plugin.d.ts +6 -0
  75. package/{src → dist/src}/plugins/plugin.d.ts +6 -3
  76. package/{src → dist/src}/plugins/plugin.js +23 -29
  77. package/{src → dist/src}/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.d.ts +0 -1
  78. package/{src → dist/src}/plugins/utils/apply-base-config.d.ts +0 -1
  79. package/{src → dist/src}/plugins/utils/apply-base-config.js +2 -2
  80. package/dist/src/plugins/utils/apply-react-config.d.ts +2 -0
  81. package/dist/src/plugins/utils/apply-react-config.js +20 -0
  82. package/{src → dist/src}/plugins/utils/apply-web-config.d.ts +0 -1
  83. package/{src → dist/src}/plugins/utils/apply-web-config.js +7 -17
  84. package/{src → dist/src}/plugins/utils/get-css-module-local-ident.d.ts +0 -1
  85. package/{src → dist/src}/plugins/utils/get-non-buildable-libs.d.ts +0 -1
  86. package/{src → dist/src}/plugins/utils/get-terser-ecma-version.d.ts +0 -1
  87. package/{src → dist/src}/plugins/utils/get-transitive-deps.d.ts +0 -1
  88. package/{src → dist/src}/plugins/utils/hash-format.d.ts +0 -1
  89. package/{src → dist/src}/plugins/utils/instantiate-script-plugins.d.ts +0 -1
  90. package/{src → dist/src}/plugins/utils/is-lib-buildable.d.ts +0 -1
  91. package/dist/src/plugins/utils/loaders/deprecated-less-loader.js +19 -0
  92. package/{src → dist/src}/plugins/utils/loaders/stylesheet-loaders.d.ts +0 -1
  93. package/{src → dist/src}/plugins/utils/models.d.ts +1 -11
  94. package/{src → dist/src}/plugins/utils/normalize-entry.d.ts +0 -1
  95. package/{src → dist/src}/plugins/utils/plugins/generate-package-json-plugin.d.ts +0 -1
  96. package/{src → dist/src}/plugins/utils/plugins/normalize-options.d.ts +0 -1
  97. package/{src → dist/src}/plugins/utils/plugins/normalize-options.js +2 -2
  98. package/{src → dist/src}/plugins/utils/plugins/nx-tsconfig-paths-rspack-plugin.d.ts +0 -1
  99. package/{src → dist/src}/plugins/utils/plugins/nx-tsconfig-paths-rspack-plugin.js +3 -3
  100. package/{src → dist/src}/plugins/utils/plugins/postcss-cli-resources.d.ts +0 -1
  101. package/{src → dist/src}/plugins/utils/plugins/rspack-nx-build-coordination-plugin.d.ts +0 -1
  102. package/{src → dist/src}/plugins/utils/plugins/scripts-rspack-plugin.d.ts +0 -1
  103. package/{src → dist/src}/plugins/utils/plugins/stats-json-plugin.d.ts +0 -1
  104. package/{src → dist/src}/plugins/write-index-html-plugin.d.ts +0 -1
  105. package/dist/src/utils/assert-supported-rspack-version.d.ts +2 -0
  106. package/dist/src/utils/assert-supported-rspack-version.js +8 -0
  107. package/{src → dist/src}/utils/config.d.ts +14 -1
  108. package/{src → dist/src}/utils/config.js +19 -2
  109. package/{src → dist/src}/utils/create-compiler.d.ts +0 -1
  110. package/dist/src/utils/deprecation.d.ts +8 -0
  111. package/dist/src/utils/deprecation.js +50 -0
  112. package/dist/src/utils/e2e-web-server-info-utils.d.ts +2 -0
  113. package/{src → dist/src}/utils/e2e-web-server-info-utils.js +6 -5
  114. package/{src → dist/src}/utils/generator-utils.d.ts +0 -1
  115. package/{src → dist/src}/utils/generator-utils.js +3 -4
  116. package/{src → dist/src}/utils/get-copy-patterns.d.ts +0 -1
  117. package/{src → dist/src}/utils/has-plugin.d.ts +0 -1
  118. package/{src → dist/src}/utils/jest-utils.d.ts +0 -1
  119. package/{src → dist/src}/utils/mode-utils.d.ts +0 -1
  120. package/{src → dist/src}/utils/model.d.ts +0 -1
  121. package/dist/src/utils/module-federation-deprecation.d.ts +6 -0
  122. package/dist/src/utils/module-federation-deprecation.js +30 -0
  123. package/{src → dist/src}/utils/normalize-assets.d.ts +0 -1
  124. package/{src → dist/src}/utils/read-rspack-options.d.ts +0 -1
  125. package/{src → dist/src}/utils/resolve-user-defined-rspack-config.d.ts +0 -1
  126. package/{src → dist/src}/utils/resolve-user-defined-rspack-config.js +2 -2
  127. package/dist/src/utils/version-utils.d.ts +26 -0
  128. package/dist/src/utils/version-utils.js +53 -0
  129. package/dist/src/utils/versions.d.ts +23 -0
  130. package/dist/src/utils/versions.js +29 -0
  131. package/{src → dist/src}/utils/webpack/interpolate-env-variables-to-index.d.ts +0 -1
  132. package/{src → dist/src}/utils/webpack/normalize-entry.d.ts +0 -1
  133. package/{src → dist/src}/utils/webpack/package-chunk-sort.d.ts +0 -1
  134. package/{src → dist/src}/utils/with-nx.d.ts +4 -1
  135. package/{src → dist/src}/utils/with-nx.js +6 -0
  136. package/dist/src/utils/with-react.d.ts +12 -0
  137. package/{src → dist/src}/utils/with-react.js +9 -1
  138. package/{src → dist/src}/utils/with-web.d.ts +7 -2
  139. package/{src → dist/src}/utils/with-web.js +8 -0
  140. package/executors.json +12 -12
  141. package/generators.json +10 -10
  142. package/migrations.json +60 -47
  143. package/package.json +138 -20
  144. package/app-plugin.d.ts.map +0 -1
  145. package/module-federation.d.ts.map +0 -1
  146. package/plugin.d.ts +0 -3
  147. package/plugin.d.ts.map +0 -1
  148. package/react-plugin.d.ts.map +0 -1
  149. package/src/executors/dev-server/dev-server.impl.d.ts.map +0 -1
  150. package/src/executors/dev-server/lib/get-dev-server-config.d.ts.map +0 -1
  151. package/src/executors/dev-server/lib/serve-path.d.ts.map +0 -1
  152. package/src/executors/module-federation-dev-server/lib/index.d.ts.map +0 -1
  153. package/src/executors/module-federation-dev-server/lib/normalize-options.d.ts.map +0 -1
  154. package/src/executors/module-federation-dev-server/lib/start-remotes.d.ts.map +0 -1
  155. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts.map +0 -1
  156. package/src/executors/module-federation-ssr-dev-server/lib/index.d.ts.map +0 -1
  157. package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts.map +0 -1
  158. package/src/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts.map +0 -1
  159. package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts.map +0 -1
  160. package/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts.map +0 -1
  161. package/src/executors/rspack/lib/config.d.ts.map +0 -1
  162. package/src/executors/rspack/lib/normalize-options.d.ts.map +0 -1
  163. package/src/executors/rspack/rspack.impl.d.ts.map +0 -1
  164. package/src/executors/ssr-dev-server/lib/wait-until-server-is-listening.d.ts.map +0 -1
  165. package/src/executors/ssr-dev-server/ssr-dev-server.impl.d.ts.map +0 -1
  166. package/src/generators/configuration/configuration.d.ts.map +0 -1
  167. package/src/generators/convert-config-to-rspack-plugin/convert-config-to-rspack-plugin.d.ts.map +0 -1
  168. package/src/generators/convert-config-to-rspack-plugin/lib/extract-rspack-options.d.ts.map +0 -1
  169. package/src/generators/convert-config-to-rspack-plugin/lib/normalize-path-options.d.ts.map +0 -1
  170. package/src/generators/convert-config-to-rspack-plugin/lib/utils.d.ts.map +0 -1
  171. package/src/generators/convert-config-to-rspack-plugin/lib/validate-project.d.ts.map +0 -1
  172. package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +0 -1
  173. package/src/generators/convert-to-inferred/utils/ast.d.ts.map +0 -1
  174. package/src/generators/convert-to-inferred/utils/build-post-target-transformer.d.ts.map +0 -1
  175. package/src/generators/convert-to-inferred/utils/index.d.ts.map +0 -1
  176. package/src/generators/convert-to-inferred/utils/serve-post-target-transformer.d.ts.map +0 -1
  177. package/src/generators/convert-to-inferred/utils/types.d.ts.map +0 -1
  178. package/src/generators/convert-webpack/convert-webpack.d.ts.map +0 -1
  179. package/src/generators/convert-webpack/lib/transform-cjs.d.ts.map +0 -1
  180. package/src/generators/convert-webpack/lib/transform-esm.d.ts.map +0 -1
  181. package/src/generators/convert-webpack/lib/transform-plugin-config.d.ts.map +0 -1
  182. package/src/generators/init/init.d.ts.map +0 -1
  183. package/src/index.d.ts.map +0 -1
  184. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts +0 -3
  185. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +0 -1
  186. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +0 -41
  187. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.md +0 -25
  188. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts +0 -3
  189. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +0 -1
  190. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +0 -18
  191. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.md +0 -23
  192. package/src/migrations/update-22-0-0/remove-deprecated-options.d.ts.map +0 -1
  193. package/src/plugins/generate-package-json-plugin.d.ts.map +0 -1
  194. package/src/plugins/nx-app-rspack-plugin/nx-app-rspack-plugin.d.ts.map +0 -1
  195. package/src/plugins/nx-react-rspack-plugin/nx-react-rspack-plugin.d.ts +0 -13
  196. package/src/plugins/nx-react-rspack-plugin/nx-react-rspack-plugin.d.ts.map +0 -1
  197. package/src/plugins/plugin.d.ts.map +0 -1
  198. package/src/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.d.ts.map +0 -1
  199. package/src/plugins/utils/apply-base-config.d.ts.map +0 -1
  200. package/src/plugins/utils/apply-react-config.d.ts +0 -6
  201. package/src/plugins/utils/apply-react-config.d.ts.map +0 -1
  202. package/src/plugins/utils/apply-react-config.js +0 -51
  203. package/src/plugins/utils/apply-web-config.d.ts.map +0 -1
  204. package/src/plugins/utils/get-css-module-local-ident.d.ts.map +0 -1
  205. package/src/plugins/utils/get-non-buildable-libs.d.ts.map +0 -1
  206. package/src/plugins/utils/get-terser-ecma-version.d.ts.map +0 -1
  207. package/src/plugins/utils/get-transitive-deps.d.ts.map +0 -1
  208. package/src/plugins/utils/hash-format.d.ts.map +0 -1
  209. package/src/plugins/utils/instantiate-script-plugins.d.ts.map +0 -1
  210. package/src/plugins/utils/is-lib-buildable.d.ts.map +0 -1
  211. package/src/plugins/utils/loaders/stylesheet-loaders.d.ts.map +0 -1
  212. package/src/plugins/utils/models.d.ts.map +0 -1
  213. package/src/plugins/utils/normalize-entry.d.ts.map +0 -1
  214. package/src/plugins/utils/plugins/generate-package-json-plugin.d.ts.map +0 -1
  215. package/src/plugins/utils/plugins/normalize-options.d.ts.map +0 -1
  216. package/src/plugins/utils/plugins/nx-tsconfig-paths-rspack-plugin.d.ts.map +0 -1
  217. package/src/plugins/utils/plugins/postcss-cli-resources.d.ts.map +0 -1
  218. package/src/plugins/utils/plugins/rspack-nx-build-coordination-plugin.d.ts.map +0 -1
  219. package/src/plugins/utils/plugins/scripts-rspack-plugin.d.ts.map +0 -1
  220. package/src/plugins/utils/plugins/stats-json-plugin.d.ts.map +0 -1
  221. package/src/plugins/write-index-html-plugin.d.ts.map +0 -1
  222. package/src/utils/config.d.ts.map +0 -1
  223. package/src/utils/create-compiler.d.ts.map +0 -1
  224. package/src/utils/e2e-web-server-info-utils.d.ts +0 -3
  225. package/src/utils/e2e-web-server-info-utils.d.ts.map +0 -1
  226. package/src/utils/generator-utils.d.ts.map +0 -1
  227. package/src/utils/get-copy-patterns.d.ts.map +0 -1
  228. package/src/utils/has-plugin.d.ts.map +0 -1
  229. package/src/utils/jest-utils.d.ts.map +0 -1
  230. package/src/utils/mode-utils.d.ts.map +0 -1
  231. package/src/utils/model.d.ts.map +0 -1
  232. package/src/utils/normalize-assets.d.ts.map +0 -1
  233. package/src/utils/read-rspack-options.d.ts.map +0 -1
  234. package/src/utils/resolve-user-defined-rspack-config.d.ts.map +0 -1
  235. package/src/utils/versions.d.ts +0 -9
  236. package/src/utils/versions.d.ts.map +0 -1
  237. package/src/utils/versions.js +0 -11
  238. package/src/utils/webpack/interpolate-env-variables-to-index.d.ts.map +0 -1
  239. package/src/utils/webpack/normalize-entry.d.ts.map +0 -1
  240. package/src/utils/webpack/package-chunk-sort.d.ts.map +0 -1
  241. package/src/utils/with-nx.d.ts.map +0 -1
  242. package/src/utils/with-react.d.ts +0 -13
  243. package/src/utils/with-react.d.ts.map +0 -1
  244. package/src/utils/with-web.d.ts.map +0 -1
  245. /package/{LICENSE → dist/LICENSE} +0 -0
  246. /package/{app-plugin.js → dist/app-plugin.js} +0 -0
  247. /package/{module-federation.js → dist/module-federation.js} +0 -0
  248. /package/{react-plugin.js → dist/react-plugin.js} +0 -0
  249. /package/{src → dist/src}/executors/dev-server/lib/get-dev-server-config.js +0 -0
  250. /package/{src → dist/src}/executors/dev-server/lib/serve-path.js +0 -0
  251. /package/{src → dist/src}/executors/dev-server/schema.d.ts +0 -0
  252. /package/{src → dist/src}/executors/module-federation-dev-server/lib/index.js +0 -0
  253. /package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.js +0 -0
  254. /package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.js +0 -0
  255. /package/{src → dist/src}/executors/module-federation-dev-server/schema.d.ts +0 -0
  256. /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.js +0 -0
  257. /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -0
  258. /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.js +0 -0
  259. /package/{src → dist/src}/executors/module-federation-static-server/schema.d.ts +0 -0
  260. /package/{src → dist/src}/executors/rspack/schema.d.ts +0 -0
  261. /package/{src → dist/src}/executors/ssr-dev-server/lib/wait-until-server-is-listening.js +0 -0
  262. /package/{src → dist/src}/executors/ssr-dev-server/schema.d.ts +0 -0
  263. /package/{src → dist/src}/executors/ssr-dev-server/schema.json +0 -0
  264. /package/{src → dist/src}/generators/configuration/schema.d.ts +0 -0
  265. /package/{src → dist/src}/generators/configuration/schema.json +0 -0
  266. /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/extract-rspack-options.js +0 -0
  267. /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/normalize-path-options.js +0 -0
  268. /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/utils.js +0 -0
  269. /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/lib/validate-project.js +0 -0
  270. /package/{src → dist/src}/generators/convert-config-to-rspack-plugin/schema.json +0 -0
  271. /package/{src → dist/src}/generators/convert-to-inferred/schema.json +0 -0
  272. /package/{src → dist/src}/generators/convert-to-inferred/utils/ast.js +0 -0
  273. /package/{src → dist/src}/generators/convert-to-inferred/utils/index.js +0 -0
  274. /package/{src → dist/src}/generators/convert-to-inferred/utils/types.js +0 -0
  275. /package/{src → dist/src}/generators/convert-webpack/lib/transform-cjs.js +0 -0
  276. /package/{src → dist/src}/generators/convert-webpack/lib/transform-esm.js +0 -0
  277. /package/{src → dist/src}/generators/convert-webpack/lib/transform-plugin-config.js +0 -0
  278. /package/{src → dist/src}/generators/convert-webpack/schema.d.ts +0 -0
  279. /package/{src → dist/src}/generators/convert-webpack/schema.json +0 -0
  280. /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
  281. /package/{src → dist/src}/index.js +0 -0
  282. /package/{src → dist/src}/plugins/generate-package-json-plugin.js +0 -0
  283. /package/{src → dist/src}/plugins/nx-app-rspack-plugin/nx-app-rspack-plugin.js +0 -0
  284. /package/{src → dist/src}/plugins/nx-react-rspack-plugin/nx-react-rspack-plugin.js +0 -0
  285. /package/{src → dist/src}/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.js +0 -0
  286. /package/{src → dist/src}/plugins/utils/get-css-module-local-ident.js +0 -0
  287. /package/{src → dist/src}/plugins/utils/get-non-buildable-libs.js +0 -0
  288. /package/{src → dist/src}/plugins/utils/get-terser-ecma-version.js +0 -0
  289. /package/{src → dist/src}/plugins/utils/get-transitive-deps.js +0 -0
  290. /package/{src → dist/src}/plugins/utils/hash-format.js +0 -0
  291. /package/{src → dist/src}/plugins/utils/instantiate-script-plugins.js +0 -0
  292. /package/{src → dist/src}/plugins/utils/is-lib-buildable.js +0 -0
  293. /package/{src → dist/src}/plugins/utils/loaders/stylesheet-loaders.js +0 -0
  294. /package/{src → dist/src}/plugins/utils/models.js +0 -0
  295. /package/{src → dist/src}/plugins/utils/normalize-entry.js +0 -0
  296. /package/{src → dist/src}/plugins/utils/plugins/generate-package-json-plugin.js +0 -0
  297. /package/{src → dist/src}/plugins/utils/plugins/postcss-cli-resources.js +0 -0
  298. /package/{src → dist/src}/plugins/utils/plugins/rspack-nx-build-coordination-plugin.js +0 -0
  299. /package/{src → dist/src}/plugins/utils/plugins/scripts-rspack-plugin.js +0 -0
  300. /package/{src → dist/src}/plugins/utils/plugins/stats-json-plugin.js +0 -0
  301. /package/{src → dist/src}/plugins/write-index-html-plugin.js +0 -0
  302. /package/{src → dist/src}/utils/create-compiler.js +0 -0
  303. /package/{src → dist/src}/utils/get-copy-patterns.js +0 -0
  304. /package/{src → dist/src}/utils/has-plugin.js +0 -0
  305. /package/{src → dist/src}/utils/jest-utils.js +0 -0
  306. /package/{src → dist/src}/utils/mode-utils.js +0 -0
  307. /package/{src → dist/src}/utils/model.js +0 -0
  308. /package/{src → dist/src}/utils/normalize-assets.js +0 -0
  309. /package/{src → dist/src}/utils/read-rspack-options.js +0 -0
  310. /package/{src → dist/src}/utils/webpack/interpolate-env-variables-to-index.js +0 -0
  311. /package/{src → dist/src}/utils/webpack/normalize-entry.js +0 -0
  312. /package/{src → dist/src}/utils/webpack/package-chunk-sort.js +0 -0
@@ -1,3 +1,2 @@
1
1
  export { NxAppRspackPlugin } from './src/plugins/nx-app-rspack-plugin/nx-app-rspack-plugin';
2
2
  export type { NxAppRspackPluginOptions } from './src/plugins/utils/models';
3
- //# sourceMappingURL=app-plugin.d.ts.map
@@ -2,4 +2,3 @@
2
2
  * @deprecated Use `@nx/module-federation/rspack` instead. This will be removed in Nx v22.
3
3
  */
4
4
  export { withModuleFederation, withModuleFederationForSSR, } from '@nx/module-federation/rspack';
5
- //# sourceMappingURL=module-federation.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { createDependencies, createNodes, createNodesV2, } from './src/plugins/plugin';
2
+ export type { RspackPluginOptions } from './src/plugins/plugin';
@@ -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; } });
@@ -1,2 +1 @@
1
1
  export { NxReactRspackPlugin } from './src/plugins/nx-react-rspack-plugin/nx-react-rspack-plugin';
2
- //# sourceMappingURL=react-plugin.d.ts.map
@@ -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}}
@@ -4,4 +4,3 @@ export default function runExecutor(options: DevServerExecutorSchema, context: E
4
4
  success: boolean;
5
5
  baseUrl?: string;
6
6
  }>;
7
- //# sourceMappingURL=dev-server.impl.d.ts.map
@@ -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 async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
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, ts_solution_setup_1.getProjectSourceRoot)(metadata);
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, async_iterable_1.createAsyncIterable)(({ next }) => {
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",
@@ -1,3 +1,2 @@
1
1
  export * from './normalize-options';
2
2
  export * from './start-remotes';
3
- //# sourceMappingURL=index.d.ts.map
@@ -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
@@ -4,4 +4,3 @@ export default function moduleFederationDevServer(schema: ModuleFederationDevSer
4
4
  success: boolean;
5
5
  baseUrl?: string;
6
6
  }>;
7
- //# sourceMappingURL=module-federation-dev-server.impl.d.ts.map
@@ -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 async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
- const utils_1 = require("@nx/module-federation/src/executors/utils");
9
- const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
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, file_server_impl_1.default)({
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, ts_solution_setup_1.getProjectSourceRoot)(p), 'assets/module-federation.manifest.json');
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, utils_1.startRemoteIterators)(options, context, lib_1.startRemotes, pathToManifestFile, 'react');
43
- return yield* (0, async_iterable_1.combineAsyncIterables)(currIter, ...devRemoteIters, ...(staticRemotesIter ? [staticRemotesIter] : []), (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
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, wait_for_port_open_1.waitForPortOpen)(port, {
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",
@@ -1,3 +1,2 @@
1
1
  export * from './normalize-options';
2
2
  export * from './start-remotes';
3
- //# sourceMappingURL=index.d.ts.map
@@ -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 async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
- const utils_1 = require("@nx/module-federation/src/executors/utils");
9
- 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");
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, ts_solution_setup_1.getProjectSourceRoot)(projectConfig), 'assets/module-federation.manifest.json');
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, utils_1.startRemoteIterators)(options, context, lib_1.startRemotes, pathToManifestFile, 'react', true);
33
- return yield* (0, async_iterable_1.combineAsyncIterables)(iter, ...devRemoteIters, ...(staticRemotesIter ? [staticRemotesIter] : []), (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
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, wait_for_port_open_1.waitForPortOpen)(port, {
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/src/executors/utils';
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/src/utils';
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 tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const devkit_1 = require("@nx/devkit");
7
- const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
8
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
- const utils_1 = require("@nx/module-federation/src/executors/utils");
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, ts_solution_setup_1.getProjectSourceRoot)(context.projectGraph.nodes[context.projectName].data), 'assets/module-federation.manifest.json');
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, utils_2.getModuleFederationConfig)(options.buildOptions.tsConfig, context.root, p.root, 'react');
168
- const remotes = (0, utils_2.getRemotes)([], options.serveOptions.skipRemotes, moduleFederationConfig, {
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, utils_2.parseStaticRemotesConfig)([...remotes.staticRemotes, ...remotes.dynamicRemotes], context);
172
+ const staticRemotesConfig = (0, internal_3.parseStaticRemotesConfig)([...remotes.staticRemotes, ...remotes.dynamicRemotes], context);
174
173
  options.serveOptions.staticRemotesPort ??= remotes.staticRemotePort;
175
- const mappedLocationsOfStaticRemotes = await (0, utils_1.buildStaticRemotes)(staticRemotesConfig, nxBin, context, options.serveOptions);
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, file_server_impl_1.default)({
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, async_iterable_1.combineAsyncIterables)(staticFileServerIter, (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
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, wait_for_port_open_1.waitForPortOpen)(port, {
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, wait_for_port_open_1.waitForPortOpen)(port, {
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
- const config = (options.target === 'web'
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 ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
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, ts_solution_setup_1.isUsingTsSolutionSetup)(),
11
+ useTsconfigPaths: !(0, internal_1.isUsingTsSolutionSetup)(),
12
12
  root,
13
13
  projectRoot,
14
14
  sourceRoot,
@@ -4,4 +4,3 @@ export default function runExecutor(options: RspackExecutorSchema, context: Exec
4
4
  success: boolean;
5
5
  outfile?: string;
6
6
  }, void, any>;
7
- //# sourceMappingURL=rspack.impl.d.ts.map
@@ -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 async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const js_1 = require("@nx/js");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
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, ts_solution_setup_1.getProjectSourceRoot)(metadata);
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, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
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",
@@ -1,2 +1 @@
1
1
  export declare function waitUntilServerIsListening(port: number): Promise<void>;
2
- //# sourceMappingURL=wait-until-server-is-listening.d.ts.map
@@ -6,4 +6,3 @@ export declare function ssrDevServerExecutor(options: RspackSsrDevServerOptions,
6
6
  options: TargetOptions;
7
7
  }, void, unknown>;
8
8
  export default ssrDevServerExecutor;
9
- //# sourceMappingURL=ssr-dev-server.impl.d.ts.map
@@ -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, async_iterable_1.combineAsyncIterables)(runBrowser, runServer);
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 ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
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
- // Nx 15.8 moved util to @nx/js, but it is in @nx/workspace in 15.7
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, ts_solution_setup_1.getProjectType)(tree, options.project, projectType) === 'library' ||
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
  }
@@ -5,4 +5,3 @@ interface Schema {
5
5
  }
6
6
  export declare function convertConfigToRspackPluginGenerator(tree: Tree, options: Schema): Promise<void>;
7
7
  export default convertConfigToRspackPluginGenerator;
8
- //# sourceMappingURL=convert-config-to-rspack-plugin.d.ts.map