@nx/webpack 23.0.0-pr.35465.2bc2643 → 23.0.0-rc.1

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 (233) hide show
  1. package/{app-plugin.d.ts → dist/app-plugin.d.ts} +0 -1
  2. package/{index.d.ts → dist/index.d.ts} +0 -4
  3. package/{index.js → dist/index.js} +1 -4
  4. package/dist/internal.d.ts +8 -0
  5. package/dist/internal.js +26 -0
  6. package/{plugin.d.ts → dist/plugin.d.ts} +0 -1
  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 +10 -8
  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/ssr-dev-server/lib/wait-until-server-is-listening.d.ts +0 -1
  13. package/{src → dist/src}/executors/ssr-dev-server/ssr-dev-server.impl.d.ts +0 -1
  14. package/{src → dist/src}/executors/ssr-dev-server/ssr-dev-server.impl.js +2 -2
  15. package/{src → dist/src}/executors/webpack/lib/normalize-options.d.ts +0 -1
  16. package/{src → dist/src}/executors/webpack/lib/normalize-options.js +2 -2
  17. package/{src → dist/src}/executors/webpack/lib/run-webpack.d.ts +1 -2
  18. package/{src → dist/src}/executors/webpack/lib/run-webpack.js +3 -3
  19. package/{src → dist/src}/executors/webpack/schema.d.ts +1 -1
  20. package/{src → dist/src}/executors/webpack/schema.json +1 -0
  21. package/{src → dist/src}/executors/webpack/webpack.impl.d.ts +0 -1
  22. package/{src → dist/src}/executors/webpack/webpack.impl.js +6 -4
  23. package/{src → dist/src}/generators/configuration/configuration.d.ts +0 -1
  24. package/{src → dist/src}/generators/configuration/configuration.js +9 -2
  25. package/{src → dist/src}/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin.d.ts +0 -1
  26. package/{src → dist/src}/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin.js +5 -3
  27. package/{src → dist/src}/generators/convert-config-to-webpack-plugin/lib/extract-webpack-options.d.ts +0 -1
  28. package/{src → dist/src}/generators/convert-config-to-webpack-plugin/lib/normalize-path-options.d.ts +0 -1
  29. package/{src → dist/src}/generators/convert-config-to-webpack-plugin/lib/utils.d.ts +0 -1
  30. package/{src → dist/src}/generators/convert-config-to-webpack-plugin/lib/validate-project.d.ts +0 -1
  31. package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.d.ts +0 -1
  32. package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.js +5 -5
  33. package/{src → dist/src}/generators/convert-to-inferred/utils/ast.d.ts +0 -1
  34. package/{src → dist/src}/generators/convert-to-inferred/utils/build-post-target-transformer.d.ts +0 -1
  35. package/{src → dist/src}/generators/convert-to-inferred/utils/build-post-target-transformer.js +8 -8
  36. package/{src → dist/src}/generators/convert-to-inferred/utils/index.d.ts +0 -1
  37. package/{src → dist/src}/generators/convert-to-inferred/utils/serve-post-target-transformer.d.ts +0 -1
  38. package/{src → dist/src}/generators/convert-to-inferred/utils/serve-post-target-transformer.js +4 -4
  39. package/{src → dist/src}/generators/convert-to-inferred/utils/types.d.ts +1 -2
  40. package/{src → dist/src}/generators/init/init.d.ts +0 -1
  41. package/{src → dist/src}/generators/init/init.js +10 -3
  42. package/{src → dist/src}/generators/init/schema.json +1 -1
  43. package/{src → dist/src}/migrations/update-21-0-0/remove-isolated-config.d.ts +0 -1
  44. package/{src → dist/src}/migrations/update-21-0-0/remove-isolated-config.js +2 -2
  45. package/dist/src/migrations/update-21-0-0/remove-isolated-config.md +37 -0
  46. package/{src → dist/src}/migrations/update-22-0-0/remove-deprecated-options.d.ts +0 -1
  47. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
  48. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +223 -0
  49. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
  50. package/dist/src/migrations/update-23-0-0/remove-nx-tsconfig-paths-webpack-plugin-import.d.ts +2 -0
  51. package/dist/src/migrations/update-23-0-0/remove-nx-tsconfig-paths-webpack-plugin-import.js +128 -0
  52. package/dist/src/migrations/update-23-0-0/remove-nx-tsconfig-paths-webpack-plugin-import.md +54 -0
  53. package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.d.ts +3 -0
  54. package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.js +225 -0
  55. package/{src → dist/src}/plugins/generate-package-json-plugin.d.ts +0 -1
  56. package/{src → dist/src}/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin.d.ts +0 -1
  57. package/{src → dist/src}/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin.js +5 -5
  58. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/apply-base-config.d.ts +0 -1
  59. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/apply-base-config.js +2 -2
  60. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/apply-web-config.d.ts +0 -1
  61. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/apply-web-config.js +3 -3
  62. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/compiler-loaders.d.ts +0 -1
  63. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/get-terser-ecma-version.d.ts +0 -1
  64. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/instantiate-script-plugins.d.ts +0 -1
  65. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/normalize-options.d.ts +0 -1
  66. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/normalize-options.js +2 -2
  67. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/stylesheet-loaders.d.ts +0 -1
  68. package/{src → dist/src}/plugins/nx-webpack-plugin/lib/utils.d.ts +0 -1
  69. package/{src → dist/src}/plugins/nx-webpack-plugin/nx-app-webpack-plugin-options.d.ts +1 -2
  70. package/{src → dist/src}/plugins/nx-webpack-plugin/nx-app-webpack-plugin.d.ts +0 -1
  71. package/{src → dist/src}/plugins/plugin.d.ts +3 -4
  72. package/{src → dist/src}/plugins/plugin.js +62 -29
  73. package/{src → dist/src}/plugins/stats-json-plugin.d.ts +0 -1
  74. package/{src → dist/src}/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.d.ts +0 -1
  75. package/{src → dist/src}/plugins/webpack-nx-build-coordination-plugin.d.ts +0 -1
  76. package/{src → dist/src}/plugins/write-index-html-plugin.d.ts +0 -1
  77. package/{src → dist/src}/utils/config.d.ts +12 -1
  78. package/{src → dist/src}/utils/config.js +17 -2
  79. package/{src → dist/src}/utils/create-copy-plugin.d.ts +0 -1
  80. package/dist/src/utils/deprecation.d.ts +8 -0
  81. package/dist/src/utils/deprecation.js +55 -0
  82. package/dist/src/utils/e2e-web-server-info-utils.d.ts +2 -0
  83. package/{src → dist/src}/utils/e2e-web-server-info-utils.js +6 -5
  84. package/{src → dist/src}/utils/ensure-dependencies.d.ts +0 -1
  85. package/{src → dist/src}/utils/ensure-dependencies.js +3 -3
  86. package/{src → dist/src}/utils/fs.d.ts +0 -1
  87. package/{src → dist/src}/utils/get-client-environment.d.ts +0 -1
  88. package/{src → dist/src}/utils/get-css-module-local-ident.d.ts +0 -1
  89. package/{src → dist/src}/utils/has-plugin.d.ts +0 -1
  90. package/{src → dist/src}/utils/hash-format.d.ts +0 -1
  91. package/{src → dist/src}/utils/models.d.ts +0 -1
  92. package/{src → dist/src}/utils/run-webpack.d.ts +0 -1
  93. package/dist/src/utils/versions.d.ts +12 -0
  94. package/dist/src/utils/versions.js +24 -0
  95. package/dist/src/utils/web-babel-loader.d.ts +1 -0
  96. package/{src → dist/src}/utils/web-babel-loader.js +2 -0
  97. package/dist/src/utils/webpack/deprecated-less-loader.js +19 -0
  98. package/{src → dist/src}/utils/webpack/interpolate-env-variables-to-index.d.ts +0 -1
  99. package/{src → dist/src}/utils/webpack/normalize-entry.d.ts +0 -1
  100. package/{src → dist/src}/utils/webpack/package-chunk-sort.d.ts +0 -1
  101. package/{src → dist/src}/utils/webpack/plugins/postcss-cli-resources.d.ts +0 -1
  102. package/{src → dist/src}/utils/webpack/plugins/scripts-webpack-plugin.d.ts +0 -1
  103. package/{src → dist/src}/utils/webpack/read-webpack-options.d.ts +0 -1
  104. package/{src → dist/src}/utils/webpack/resolve-user-defined-webpack-config.d.ts +0 -1
  105. package/{src → dist/src}/utils/webpack/resolve-user-defined-webpack-config.js +4 -6
  106. package/{src → dist/src}/utils/with-nx.d.ts +4 -1
  107. package/{src → dist/src}/utils/with-nx.js +6 -0
  108. package/{src → dist/src}/utils/with-web.d.ts +4 -1
  109. package/{src → dist/src}/utils/with-web.js +6 -0
  110. package/{tsconfig-paths-plugin.d.ts → dist/tsconfig-paths-plugin.d.ts} +0 -1
  111. package/executors.json +6 -6
  112. package/generators.json +8 -8
  113. package/migrations.json +34 -20
  114. package/package.json +85 -16
  115. package/app-plugin.d.ts.map +0 -1
  116. package/index.d.ts.map +0 -1
  117. package/plugin.d.ts.map +0 -1
  118. package/src/executors/dev-server/dev-server.impl.d.ts.map +0 -1
  119. package/src/executors/dev-server/lib/get-dev-server-config.d.ts.map +0 -1
  120. package/src/executors/dev-server/lib/serve-path.d.ts.map +0 -1
  121. package/src/executors/ssr-dev-server/lib/wait-until-server-is-listening.d.ts.map +0 -1
  122. package/src/executors/ssr-dev-server/ssr-dev-server.impl.d.ts.map +0 -1
  123. package/src/executors/webpack/lib/normalize-options.d.ts.map +0 -1
  124. package/src/executors/webpack/lib/run-webpack.d.ts.map +0 -1
  125. package/src/executors/webpack/webpack.impl.d.ts.map +0 -1
  126. package/src/generators/configuration/configuration.d.ts.map +0 -1
  127. package/src/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin.d.ts.map +0 -1
  128. package/src/generators/convert-config-to-webpack-plugin/lib/extract-webpack-options.d.ts.map +0 -1
  129. package/src/generators/convert-config-to-webpack-plugin/lib/normalize-path-options.d.ts.map +0 -1
  130. package/src/generators/convert-config-to-webpack-plugin/lib/utils.d.ts.map +0 -1
  131. package/src/generators/convert-config-to-webpack-plugin/lib/validate-project.d.ts.map +0 -1
  132. package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +0 -1
  133. package/src/generators/convert-to-inferred/utils/ast.d.ts.map +0 -1
  134. package/src/generators/convert-to-inferred/utils/build-post-target-transformer.d.ts.map +0 -1
  135. package/src/generators/convert-to-inferred/utils/index.d.ts.map +0 -1
  136. package/src/generators/convert-to-inferred/utils/serve-post-target-transformer.d.ts.map +0 -1
  137. package/src/generators/convert-to-inferred/utils/types.d.ts.map +0 -1
  138. package/src/generators/init/init.d.ts.map +0 -1
  139. package/src/migrations/update-21-0-0/remove-isolated-config.d.ts.map +0 -1
  140. package/src/migrations/update-22-0-0/remove-deprecated-options.d.ts.map +0 -1
  141. package/src/plugins/generate-package-json-plugin.d.ts.map +0 -1
  142. package/src/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin.d.ts.map +0 -1
  143. package/src/plugins/nx-webpack-plugin/lib/apply-base-config.d.ts.map +0 -1
  144. package/src/plugins/nx-webpack-plugin/lib/apply-web-config.d.ts.map +0 -1
  145. package/src/plugins/nx-webpack-plugin/lib/compiler-loaders.d.ts.map +0 -1
  146. package/src/plugins/nx-webpack-plugin/lib/get-terser-ecma-version.d.ts.map +0 -1
  147. package/src/plugins/nx-webpack-plugin/lib/instantiate-script-plugins.d.ts.map +0 -1
  148. package/src/plugins/nx-webpack-plugin/lib/normalize-options.d.ts.map +0 -1
  149. package/src/plugins/nx-webpack-plugin/lib/stylesheet-loaders.d.ts.map +0 -1
  150. package/src/plugins/nx-webpack-plugin/lib/utils.d.ts.map +0 -1
  151. package/src/plugins/nx-webpack-plugin/nx-app-webpack-plugin-options.d.ts.map +0 -1
  152. package/src/plugins/nx-webpack-plugin/nx-app-webpack-plugin.d.ts.map +0 -1
  153. package/src/plugins/plugin.d.ts.map +0 -1
  154. package/src/plugins/stats-json-plugin.d.ts.map +0 -1
  155. package/src/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.d.ts.map +0 -1
  156. package/src/plugins/webpack-nx-build-coordination-plugin.d.ts.map +0 -1
  157. package/src/plugins/write-index-html-plugin.d.ts.map +0 -1
  158. package/src/utils/config.d.ts.map +0 -1
  159. package/src/utils/create-copy-plugin.d.ts.map +0 -1
  160. package/src/utils/e2e-web-server-info-utils.d.ts +0 -3
  161. package/src/utils/e2e-web-server-info-utils.d.ts.map +0 -1
  162. package/src/utils/ensure-dependencies.d.ts.map +0 -1
  163. package/src/utils/fs.d.ts.map +0 -1
  164. package/src/utils/get-client-environment.d.ts.map +0 -1
  165. package/src/utils/get-css-module-local-ident.d.ts.map +0 -1
  166. package/src/utils/has-plugin.d.ts.map +0 -1
  167. package/src/utils/hash-format.d.ts.map +0 -1
  168. package/src/utils/models.d.ts.map +0 -1
  169. package/src/utils/run-webpack.d.ts.map +0 -1
  170. package/src/utils/versions.d.ts +0 -8
  171. package/src/utils/versions.d.ts.map +0 -1
  172. package/src/utils/versions.js +0 -11
  173. package/src/utils/web-babel-loader.d.ts +0 -1
  174. package/src/utils/web-babel-loader.d.ts.map +0 -1
  175. package/src/utils/webpack/interpolate-env-variables-to-index.d.ts.map +0 -1
  176. package/src/utils/webpack/normalize-entry.d.ts.map +0 -1
  177. package/src/utils/webpack/package-chunk-sort.d.ts.map +0 -1
  178. package/src/utils/webpack/plugins/postcss-cli-resources.d.ts.map +0 -1
  179. package/src/utils/webpack/plugins/scripts-webpack-plugin.d.ts.map +0 -1
  180. package/src/utils/webpack/read-webpack-options.d.ts.map +0 -1
  181. package/src/utils/webpack/resolve-user-defined-webpack-config.d.ts.map +0 -1
  182. package/src/utils/with-nx.d.ts.map +0 -1
  183. package/src/utils/with-web.d.ts.map +0 -1
  184. package/tsconfig-paths-plugin.d.ts.map +0 -1
  185. /package/{LICENSE → dist/LICENSE} +0 -0
  186. /package/{app-plugin.js → dist/app-plugin.js} +0 -0
  187. /package/{plugin.js → dist/plugin.js} +0 -0
  188. /package/{src → dist/src}/executors/dev-server/lib/get-dev-server-config.js +0 -0
  189. /package/{src → dist/src}/executors/dev-server/lib/serve-path.js +0 -0
  190. /package/{src → dist/src}/executors/dev-server/schema.d.ts +0 -0
  191. /package/{src → dist/src}/executors/ssr-dev-server/lib/wait-until-server-is-listening.js +0 -0
  192. /package/{src → dist/src}/executors/ssr-dev-server/schema.d.ts +0 -0
  193. /package/{src → dist/src}/executors/ssr-dev-server/schema.json +0 -0
  194. /package/{src → dist/src}/generators/configuration/schema.d.ts +0 -0
  195. /package/{src → dist/src}/generators/configuration/schema.json +0 -0
  196. /package/{src → dist/src}/generators/convert-config-to-webpack-plugin/lib/extract-webpack-options.js +0 -0
  197. /package/{src → dist/src}/generators/convert-config-to-webpack-plugin/lib/normalize-path-options.js +0 -0
  198. /package/{src → dist/src}/generators/convert-config-to-webpack-plugin/lib/utils.js +0 -0
  199. /package/{src → dist/src}/generators/convert-config-to-webpack-plugin/lib/validate-project.js +0 -0
  200. /package/{src → dist/src}/generators/convert-config-to-webpack-plugin/schema.json +0 -0
  201. /package/{src → dist/src}/generators/convert-to-inferred/schema.json +0 -0
  202. /package/{src → dist/src}/generators/convert-to-inferred/utils/ast.js +0 -0
  203. /package/{src → dist/src}/generators/convert-to-inferred/utils/index.js +0 -0
  204. /package/{src → dist/src}/generators/convert-to-inferred/utils/types.js +0 -0
  205. /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
  206. /package/{src → dist/src}/migrations/update-22-0-0/remove-deprecated-options.js +0 -0
  207. /package/{src → dist/src}/plugins/generate-package-json-plugin.js +0 -0
  208. /package/{src → dist/src}/plugins/nx-webpack-plugin/lib/compiler-loaders.js +0 -0
  209. /package/{src → dist/src}/plugins/nx-webpack-plugin/lib/get-terser-ecma-version.js +0 -0
  210. /package/{src → dist/src}/plugins/nx-webpack-plugin/lib/instantiate-script-plugins.js +0 -0
  211. /package/{src → dist/src}/plugins/nx-webpack-plugin/lib/stylesheet-loaders.js +0 -0
  212. /package/{src → dist/src}/plugins/nx-webpack-plugin/lib/utils.js +0 -0
  213. /package/{src → dist/src}/plugins/nx-webpack-plugin/nx-app-webpack-plugin-options.js +0 -0
  214. /package/{src → dist/src}/plugins/nx-webpack-plugin/nx-app-webpack-plugin.js +0 -0
  215. /package/{src → dist/src}/plugins/stats-json-plugin.js +0 -0
  216. /package/{src → dist/src}/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.js +0 -0
  217. /package/{src → dist/src}/plugins/webpack-nx-build-coordination-plugin.js +0 -0
  218. /package/{src → dist/src}/plugins/write-index-html-plugin.js +0 -0
  219. /package/{src → dist/src}/utils/create-copy-plugin.js +0 -0
  220. /package/{src → dist/src}/utils/fs.js +0 -0
  221. /package/{src → dist/src}/utils/get-client-environment.js +0 -0
  222. /package/{src → dist/src}/utils/get-css-module-local-ident.js +0 -0
  223. /package/{src → dist/src}/utils/has-plugin.js +0 -0
  224. /package/{src → dist/src}/utils/hash-format.js +0 -0
  225. /package/{src → dist/src}/utils/models.js +0 -0
  226. /package/{src → dist/src}/utils/run-webpack.js +0 -0
  227. /package/{src → dist/src}/utils/webpack/interpolate-env-variables-to-index.js +0 -0
  228. /package/{src → dist/src}/utils/webpack/normalize-entry.js +0 -0
  229. /package/{src → dist/src}/utils/webpack/package-chunk-sort.js +0 -0
  230. /package/{src → dist/src}/utils/webpack/plugins/postcss-cli-resources.js +0 -0
  231. /package/{src → dist/src}/utils/webpack/plugins/scripts-webpack-plugin.js +0 -0
  232. /package/{src → dist/src}/utils/webpack/read-webpack-options.js +0 -0
  233. /package/{tsconfig-paths-plugin.js → dist/tsconfig-paths-plugin.js} +0 -0
@@ -1,3 +1,2 @@
1
1
  export { NxAppWebpackPlugin } from './src/plugins/nx-webpack-plugin/nx-app-webpack-plugin';
2
2
  export type { NxAppWebpackPluginOptions } from './src/plugins/nx-webpack-plugin/nx-app-webpack-plugin-options';
3
- //# sourceMappingURL=app-plugin.d.ts.map
@@ -1,6 +1,5 @@
1
1
  import { configurationGenerator } from './src/generators/configuration/configuration';
2
2
  import { NxAppWebpackPlugin } from './src/plugins/nx-webpack-plugin/nx-app-webpack-plugin';
3
- import { NxTsconfigPathsWebpackPlugin as _NxTsconfigPathsWebpackPlugin } from './src/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin';
4
3
  import { useLegacyNxPlugin } from './src/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin';
5
4
  export declare function convertConfigToWebpackPluginGenerator(...args: Parameters<typeof import('./src/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin').convertConfigToWebpackPluginGenerator>): any;
6
5
  export { configurationGenerator, useLegacyNxPlugin };
@@ -8,8 +7,6 @@ export { configurationGenerator, useLegacyNxPlugin };
8
7
  export declare const webpackProjectGenerator: typeof configurationGenerator;
9
8
  /** @deprecated Use NxAppWebpackPlugin from `@nx/webpack/app-plugin` instead, which can improve graph creation by 150-200ms per file. */
10
9
  export declare const NxWebpackPlugin: typeof NxAppWebpackPlugin;
11
- /** @deprecated Use NxTsconfigPathsWebpackPlugin from `@nx/webpack/tsconfig-paths-plugin` instead. */
12
- export declare const NxTsconfigPathsWebpackPlugin: typeof _NxTsconfigPathsWebpackPlugin;
13
10
  export * from './src/utils/create-copy-plugin';
14
11
  export * from './src/utils/config';
15
12
  export { webpackInitGenerator } from './src/generators/init/init';
@@ -22,4 +19,3 @@ export * from './src/utils/get-css-module-local-ident';
22
19
  export * from './src/utils/with-nx';
23
20
  export * from './src/utils/with-web';
24
21
  export * from './src/utils/e2e-web-server-info-utils';
25
- //# sourceMappingURL=index.d.ts.map
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.webpackInitGenerator = exports.NxTsconfigPathsWebpackPlugin = exports.NxWebpackPlugin = exports.webpackProjectGenerator = exports.useLegacyNxPlugin = exports.configurationGenerator = void 0;
3
+ exports.webpackInitGenerator = exports.NxWebpackPlugin = exports.webpackProjectGenerator = exports.useLegacyNxPlugin = exports.configurationGenerator = void 0;
4
4
  exports.convertConfigToWebpackPluginGenerator = convertConfigToWebpackPluginGenerator;
5
5
  const tslib_1 = require("tslib");
6
6
  const configuration_1 = require("./src/generators/configuration/configuration");
7
7
  Object.defineProperty(exports, "configurationGenerator", { enumerable: true, get: function () { return configuration_1.configurationGenerator; } });
8
8
  const nx_app_webpack_plugin_1 = require("./src/plugins/nx-webpack-plugin/nx-app-webpack-plugin");
9
- const nx_tsconfig_paths_webpack_plugin_1 = require("./src/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin");
10
9
  const use_legacy_nx_plugin_1 = require("./src/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin");
11
10
  Object.defineProperty(exports, "useLegacyNxPlugin", { enumerable: true, get: function () { return use_legacy_nx_plugin_1.useLegacyNxPlugin; } });
12
11
  // Lazy-loaded to avoid requiring typescript before it's installed.
@@ -21,8 +20,6 @@ function convertConfigToWebpackPluginGenerator(...args) {
21
20
  exports.webpackProjectGenerator = configuration_1.configurationGenerator;
22
21
  /** @deprecated Use NxAppWebpackPlugin from `@nx/webpack/app-plugin` instead, which can improve graph creation by 150-200ms per file. */
23
22
  exports.NxWebpackPlugin = nx_app_webpack_plugin_1.NxAppWebpackPlugin;
24
- /** @deprecated Use NxTsconfigPathsWebpackPlugin from `@nx/webpack/tsconfig-paths-plugin` instead. */
25
- exports.NxTsconfigPathsWebpackPlugin = nx_tsconfig_paths_webpack_plugin_1.NxTsconfigPathsWebpackPlugin;
26
23
  tslib_1.__exportStar(require("./src/utils/create-copy-plugin"), exports);
27
24
  tslib_1.__exportStar(require("./src/utils/config"), exports);
28
25
  var init_1 = require("./src/generators/init/init");
@@ -0,0 +1,8 @@
1
+ export { findUp, findAllNodeModules, deleteOutputDir } from './src/utils/fs';
2
+ export { ensureDependencies } from './src/utils/ensure-dependencies';
3
+ export type { EnsureDependenciesOptions } from './src/utils/ensure-dependencies';
4
+ export { resolveUserDefinedWebpackConfig } from './src/utils/webpack/resolve-user-defined-webpack-config';
5
+ export { suppressWebpackComposeHelperWarnings } from './src/utils/deprecation';
6
+ export { WebpackNxBuildCoordinationPlugin } from './src/plugins/webpack-nx-build-coordination-plugin';
7
+ export type { WebSsrDevServerOptions } from './src/executors/ssr-dev-server/schema';
8
+ export { default as ssrDevServerExecutor } from './src/executors/ssr-dev-server/ssr-dev-server.impl';
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ssrDevServerExecutor = exports.WebpackNxBuildCoordinationPlugin = exports.suppressWebpackComposeHelperWarnings = exports.resolveUserDefinedWebpackConfig = exports.ensureDependencies = exports.deleteOutputDir = exports.findAllNodeModules = exports.findUp = void 0;
4
+ const tslib_1 = require("tslib");
5
+ // Curated internal API surface for other first-party Nx plugins (e.g. @nx/react,
6
+ // @nx/angular, @nx/web, @nx/node, @nx/next, @nx/react-native). Prefer this over
7
+ // deep `@nx/webpack/src/*` imports — those are not part of the public API.
8
+ //
9
+ // Only truly-internal symbols belong here. Anything exported from @nx/webpack's
10
+ // public entry (composePluginsSync, withNx, withWeb, normalizeOptions,
11
+ // normalizePluginPath, devServerExecutor, NormalizedWebpackExecutorOptions, …)
12
+ // must be imported from '@nx/webpack', not from here.
13
+ var fs_1 = require("./src/utils/fs");
14
+ Object.defineProperty(exports, "findUp", { enumerable: true, get: function () { return fs_1.findUp; } });
15
+ Object.defineProperty(exports, "findAllNodeModules", { enumerable: true, get: function () { return fs_1.findAllNodeModules; } });
16
+ Object.defineProperty(exports, "deleteOutputDir", { enumerable: true, get: function () { return fs_1.deleteOutputDir; } });
17
+ var ensure_dependencies_1 = require("./src/utils/ensure-dependencies");
18
+ Object.defineProperty(exports, "ensureDependencies", { enumerable: true, get: function () { return ensure_dependencies_1.ensureDependencies; } });
19
+ var resolve_user_defined_webpack_config_1 = require("./src/utils/webpack/resolve-user-defined-webpack-config");
20
+ Object.defineProperty(exports, "resolveUserDefinedWebpackConfig", { enumerable: true, get: function () { return resolve_user_defined_webpack_config_1.resolveUserDefinedWebpackConfig; } });
21
+ var deprecation_1 = require("./src/utils/deprecation");
22
+ Object.defineProperty(exports, "suppressWebpackComposeHelperWarnings", { enumerable: true, get: function () { return deprecation_1.suppressWebpackComposeHelperWarnings; } });
23
+ var webpack_nx_build_coordination_plugin_1 = require("./src/plugins/webpack-nx-build-coordination-plugin");
24
+ Object.defineProperty(exports, "WebpackNxBuildCoordinationPlugin", { enumerable: true, get: function () { return webpack_nx_build_coordination_plugin_1.WebpackNxBuildCoordinationPlugin; } });
25
+ var ssr_dev_server_impl_1 = require("./src/executors/ssr-dev-server/ssr-dev-server.impl");
26
+ Object.defineProperty(exports, "ssrDevServerExecutor", { enumerable: true, get: function () { return tslib_1.__importDefault(ssr_dev_server_impl_1).default; } });
@@ -1,2 +1 @@
1
1
  export { createNodes, createNodesV2, type WebpackPluginOptions, } from './src/plugins/plugin';
2
- //# sourceMappingURL=plugin.d.ts.map
@@ -5,4 +5,3 @@ export declare function devServerExecutor(serveOptions: WebDevServerOptions, con
5
5
  success: boolean;
6
6
  }, any, any>;
7
7
  export default devServerExecutor;
8
- //# sourceMappingURL=dev-server.impl.d.ts.map
@@ -1,20 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.devServerExecutor = devServerExecutor;
4
- const tslib_1 = require("tslib");
5
- const webpack_1 = tslib_1.__importDefault(require("webpack"));
4
+ const internal_1 = require("@nx/devkit/internal");
6
5
  const devkit_1 = require("@nx/devkit");
7
- const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
8
6
  const operators_1 = require("rxjs/operators");
9
- const webpack_dev_server_1 = tslib_1.__importDefault(require("webpack-dev-server"));
10
7
  const get_dev_server_config_1 = require("./lib/get-dev-server-config");
11
- const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
8
+ const internal_2 = require("@nx/js/internal");
12
9
  const run_webpack_1 = require("../../utils/run-webpack");
13
10
  const resolve_user_defined_webpack_config_1 = require("../../utils/webpack/resolve-user-defined-webpack-config");
11
+ const deprecation_1 = require("../../utils/deprecation");
14
12
  const normalize_options_1 = require("../webpack/lib/normalize-options");
15
13
  const config_1 = require("../../utils/config");
16
14
  const js_1 = require("@nx/js");
17
15
  async function* devServerExecutor(serveOptions, context) {
16
+ (0, deprecation_1.warnWebpackDevServerExecutorDeprecation)();
18
17
  // Default to dev mode so builds are faster and HMR mode works better.
19
18
  process.env.NODE_ENV ??= 'development';
20
19
  const { root: projectRoot, sourceRoot } = context.projectsConfigurations.projects[context.projectName];
@@ -26,9 +25,9 @@ async function* devServerExecutor(serveOptions, context) {
26
25
  if (!buildOptions.tsConfig) {
27
26
  throw new Error(`Cannot find "tsConfig" to remap paths for. Set this option in project.json.`);
28
27
  }
29
- const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, 'build', // should be generalized
28
+ const { target, dependencies } = (0, internal_2.calculateProjectBuildableDependencies)(context.taskGraph, context.projectGraph, context.root, context.projectName, 'build', // should be generalized
30
29
  context.configurationName);
31
- buildOptions.tsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)(buildOptions.tsConfig, context.root, target.data.root, dependencies);
30
+ buildOptions.tsConfig = (0, internal_2.createTmpTsConfig)(buildOptions.tsConfig, context.root, target.data.root, dependencies);
32
31
  process.env.NX_TSCONFIG_PATH = buildOptions.tsConfig;
33
32
  }
34
33
  let config;
@@ -61,7 +60,10 @@ async function* devServerExecutor(serveOptions, context) {
61
60
  config.devServer ??= devServer;
62
61
  }
63
62
  }
64
- return yield* (0, rxjs_for_await_1.eachValueFrom)((0, run_webpack_1.runWebpackDevServer)(config, webpack_1.default, webpack_dev_server_1.default).pipe((0, operators_1.tap)(({ stats }) => {
63
+ // Lazy-loaded: optional peers absent during project-graph discovery.
64
+ const webpack = require('webpack');
65
+ const WebpackDevServer = require('webpack-dev-server');
66
+ return yield* (0, internal_1.eachValueFrom)((0, run_webpack_1.runWebpackDevServer)(config, webpack, WebpackDevServer).pipe((0, operators_1.tap)(({ stats }) => {
65
67
  console.info(stats.toString(config.stats));
66
68
  }), (0, operators_1.map)(({ baseUrl, stats }) => {
67
69
  return {
@@ -2,4 +2,3 @@ import type { Configuration as WebpackDevServerConfiguration } from 'webpack-dev
2
2
  import { WebDevServerOptions } from '../schema';
3
3
  import { NormalizedWebpackExecutorOptions } from '../../webpack/schema';
4
4
  export declare function getDevServerOptions(root: string, serveOptions: WebDevServerOptions, buildOptions: NormalizedWebpackExecutorOptions): WebpackDevServerConfiguration;
5
- //# sourceMappingURL=get-dev-server-config.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import type { NormalizedWebpackExecutorOptions } from '../../webpack/schema';
2
2
  export declare function buildServePath(browserOptions: NormalizedWebpackExecutorOptions): string;
3
3
  export declare function _findDefaultServePath(baseHref?: string, deployUrl?: string): string | null;
4
- //# sourceMappingURL=serve-path.d.ts.map
@@ -6,6 +6,7 @@
6
6
  "description": "Serve an application using webpack.",
7
7
  "cli": "nx",
8
8
  "type": "object",
9
+ "x-deprecated": "The `@nx/webpack:dev-server` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/webpack:convert-to-inferred` to migrate to the `@nx/webpack/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
9
10
  "properties": {
10
11
  "buildTarget": {
11
12
  "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: WebSsrDevServerOptions, co
6
6
  options: TargetOptions;
7
7
  }, void, unknown>;
8
8
  export default ssrDevServerExecutor;
9
- //# sourceMappingURL=ssr-dev-server.impl.d.ts.map
@@ -2,9 +2,9 @@
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
7
  const pc = tslib_1.__importStar(require("picocolors"));
7
- const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
8
8
  const wait_until_server_is_listening_1 = require("./lib/wait-until-server-is-listening");
9
9
  async function* ssrDevServerExecutor(options, context) {
10
10
  const browserTarget = (0, devkit_1.parseTargetString)(options.browserTarget, context.projectGraph);
@@ -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');
@@ -1,4 +1,3 @@
1
1
  import type { NormalizedWebpackExecutorOptions, WebpackExecutorOptions } from '../schema';
2
2
  export declare function normalizeOptions(options: WebpackExecutorOptions, root: string, projectRoot: string, sourceRoot: string): NormalizedWebpackExecutorOptions;
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/nx-webpack-plugin/lib/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,
@@ -1,4 +1,3 @@
1
- import webpack from 'webpack';
1
+ import type webpack from 'webpack';
2
2
  import { Observable } from 'rxjs';
3
3
  export declare function runWebpack(config: webpack.Configuration): Observable<webpack.Stats>;
4
- //# sourceMappingURL=run-webpack.d.ts.map
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.runWebpack = runWebpack;
4
- const tslib_1 = require("tslib");
5
- const webpack_1 = tslib_1.__importDefault(require("webpack"));
6
4
  const rxjs_1 = require("rxjs");
7
5
  // TODO(jack): move to dev-server executor
8
6
  function runWebpack(config) {
7
+ // Lazy-loaded: `webpack` is an optional peer, absent during project-graph discovery.
8
+ const webpackImpl = require('webpack');
9
9
  return new rxjs_1.Observable((subscriber) => {
10
10
  // Passing `watch` option here will result in a warning due to missing callback.
11
11
  // We manually call `.watch` or `.run` later so this option isn't needed here.
12
12
  const { watch, ...normalizedConfig } = config;
13
- const webpackCompiler = (0, webpack_1.default)(normalizedConfig);
13
+ const webpackCompiler = webpackImpl(normalizedConfig);
14
14
  const callback = (err, stats) => {
15
15
  if (err) {
16
16
  subscriber.error(err);
@@ -1,4 +1,4 @@
1
- import { AssetGlob } from '@nx/js/src/utils/assets/assets';
1
+ import { AssetGlob } from '@nx/js/internal';
2
2
 
3
3
  export interface AssetGlobPattern {
4
4
  glob: string;
@@ -5,6 +5,7 @@
5
5
  "description": "Build a project using webpack.",
6
6
  "cli": "nx",
7
7
  "type": "object",
8
+ "x-deprecated": "The `@nx/webpack:webpack` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/webpack:convert-to-inferred` to migrate to the `@nx/webpack/plugin` inferred plugin. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
8
9
  "properties": {
9
10
  "crossOrigin": {
10
11
  "type": "string",
@@ -11,4 +11,3 @@ export type WebpackExecutorEvent = {
11
11
  };
12
12
  export declare function webpackExecutor(_options: WebpackExecutorOptions, context: ExecutorContext): AsyncGenerator<WebpackExecutorEvent, WebpackExecutorEvent, undefined>;
13
13
  export default webpackExecutor;
14
- //# sourceMappingURL=webpack.impl.d.ts.map
@@ -1,15 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.webpackExecutor = webpackExecutor;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
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 path_1 = require("path");
9
9
  const rxjs_1 = require("rxjs");
10
10
  const operators_1 = require("rxjs/operators");
11
11
  const config_1 = require("../../utils/config");
12
12
  const resolve_user_defined_webpack_config_1 = require("../../utils/webpack/resolve-user-defined-webpack-config");
13
+ const deprecation_1 = require("../../utils/deprecation");
13
14
  const normalize_options_1 = require("./lib/normalize-options");
14
15
  const run_webpack_1 = require("./lib/run-webpack");
15
16
  async function getWebpackConfigs(options, context) {
@@ -46,10 +47,11 @@ async function getWebpackConfigs(options, context) {
46
47
  }
47
48
  }
48
49
  async function* webpackExecutor(_options, context) {
50
+ (0, deprecation_1.warnWebpackExecutorDeprecation)();
49
51
  // Default to production build.
50
52
  process.env['NODE_ENV'] ||= 'production';
51
53
  const metadata = context.projectsConfigurations.projects[context.projectName];
52
- const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(metadata);
54
+ const sourceRoot = (0, internal_2.getProjectSourceRoot)(metadata);
53
55
  const options = (0, normalize_options_1.normalizeOptions)(_options, context.root, metadata.root, sourceRoot);
54
56
  const isScriptOptimizeOn = typeof options.optimization === 'boolean'
55
57
  ? options.optimization
@@ -83,7 +85,7 @@ async function* webpackExecutor(_options, context) {
83
85
  For libraries, configure the project to use the '@nx/dependency-checks' ESLint rule instead (https://nx.dev/nx-api/eslint-plugin/documents/dependency-checks).`);
84
86
  }
85
87
  const configs = await getWebpackConfigs(options, context);
86
- return yield* (0, rxjs_for_await_1.eachValueFrom)((0, rxjs_1.of)(configs).pipe((0, operators_1.mergeMap)((config) => (Array.isArray(config) ? (0, rxjs_1.from)(config) : (0, rxjs_1.of)(config))),
88
+ return yield* (0, internal_1.eachValueFrom)((0, rxjs_1.of)(configs).pipe((0, operators_1.mergeMap)((config) => (Array.isArray(config) ? (0, rxjs_1.from)(config) : (0, rxjs_1.of)(config))),
87
89
  // Run build sequentially and bail when first one fails.
88
90
  (0, operators_1.mergeScan)((acc, config) => {
89
91
  if (!acc.hasErrors()) {
@@ -3,4 +3,3 @@ import { ConfigurationGeneratorSchema } from './schema';
3
3
  export declare function configurationGenerator(tree: Tree, options: ConfigurationGeneratorSchema): Promise<GeneratorCallback>;
4
4
  export declare function configurationGeneratorInternal(tree: Tree, options: ConfigurationGeneratorSchema): Promise<GeneratorCallback>;
5
5
  export default configurationGenerator;
6
- //# sourceMappingURL=configuration.d.ts.map
@@ -2,15 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.configurationGenerator = configurationGenerator;
4
4
  exports.configurationGeneratorInternal = configurationGeneratorInternal;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
7
  const init_1 = require("../init/init");
7
8
  const has_plugin_1 = require("../../utils/has-plugin");
8
- const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
9
+ const deprecation_1 = require("../../utils/deprecation");
10
+ const internal_2 = require("@nx/js/internal");
9
11
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
12
+ const versions_1 = require("../../utils/versions");
10
13
  function configurationGenerator(tree, options) {
11
14
  return configurationGeneratorInternal(tree, { addPlugin: false, ...options });
12
15
  }
13
16
  async function configurationGeneratorInternal(tree, options) {
17
+ (0, versions_1.assertSupportedWebpackVersion)(tree);
14
18
  const tasks = [];
15
19
  const nxJson = (0, devkit_1.readNxJson)(tree);
16
20
  const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
@@ -27,6 +31,7 @@ async function configurationGeneratorInternal(tree, options) {
27
31
  tasks.push(depsTask);
28
32
  checkForTargetConflicts(tree, options);
29
33
  if (!(0, has_plugin_1.hasPlugin)(tree)) {
34
+ (0, deprecation_1.warnWebpackExecutorGenerating)();
30
35
  addBuildTarget(tree, options);
31
36
  if (options.devServer) {
32
37
  addServeTarget(tree, options);
@@ -127,7 +132,9 @@ module.exports = composePlugins(withNx(), (config) => {
127
132
  }
128
133
  }
129
134
  function addBuildTarget(tree, options) {
130
- (0, target_defaults_utils_1.addBuildTargetDefaults)(tree, '@nx/webpack:webpack');
135
+ (0, internal_1.addBuildTargetDefaults)(tree, '@nx/webpack:webpack', 'build', [
136
+ internal_2.TS_SOLUTION_SETUP_TSCONFIG_INPUT,
137
+ ]);
131
138
  const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
132
139
  const buildOptions = {
133
140
  target: options.target,
@@ -5,4 +5,3 @@ interface Schema {
5
5
  }
6
6
  export declare function convertConfigToWebpackPluginGenerator(tree: Tree, options: Schema): Promise<void>;
7
7
  export default convertConfigToWebpackPluginGenerator;
8
- //# sourceMappingURL=convert-config-to-webpack-plugin.d.ts.map
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertConfigToWebpackPluginGenerator = convertConfigToWebpackPluginGenerator;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const extract_webpack_options_1 = require("./lib/extract-webpack-options");
7
7
  const normalize_path_options_1 = require("./lib/normalize-path-options");
8
8
  const path_1 = require("path");
9
9
  const validate_project_1 = require("./lib/validate-project");
10
+ const versions_1 = require("../../utils/versions");
10
11
  // Make text JSON compatible
11
12
  const preprocessText = (text) => {
12
13
  return text
@@ -16,9 +17,10 @@ const preprocessText = (text) => {
16
17
  .replace(/(\r\n|\n|\r|\t)/gm, ''); // Remove newlines and tabs
17
18
  };
18
19
  async function convertConfigToWebpackPluginGenerator(tree, options) {
20
+ (0, versions_1.assertSupportedWebpackVersion)(tree);
19
21
  let migrated = 0;
20
22
  const projects = (0, devkit_1.getProjects)(tree);
21
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (currentTargetOptions, projectName, targetName, configurationName) => {
23
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (currentTargetOptions, projectName, targetName, configurationName) => {
22
24
  if (options.project && projectName !== options.project) {
23
25
  return;
24
26
  }
@@ -73,7 +75,7 @@ async function convertConfigToWebpackPluginGenerator(tree, options) {
73
75
  // To enhance configurations after Nx plugins have applied, you can add a new plugin with the \`apply\` method.
74
76
  // e.g. \`{ apply: (compiler) => { /* modify compiler.options */ }\`
75
77
  // eslint-disable-next-line react-hooks/rules-of-hooks
76
- await useLegacyNxPlugin(require('./webpack.config.old'), options),
78
+ await useLegacyNxPlugin(require('./webpack.config.old${ext}'), options),
77
79
  ],
78
80
  });
79
81
  `);
@@ -4,4 +4,3 @@ export declare function extractWebpackOptions(tree: Tree, webpackConfigPath: str
4
4
  withNxConfig: "" | ts.Node;
5
5
  withReactConfig: "" | ts.Node;
6
6
  };
7
- //# sourceMappingURL=extract-webpack-options.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import { WebpackExecutorOptions } from '../../../executors/webpack/schema';
2
2
  export declare function normalizePathOptions(projectRoot: string, options: Partial<WebpackExecutorOptions>): Partial<WebpackExecutorOptions>;
3
- //# sourceMappingURL=normalize-path-options.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function toProjectRelativePath(path: string, projectRoot: string): string;
2
- //# sourceMappingURL=utils.d.ts.map
@@ -7,4 +7,3 @@ import { ProjectConfiguration, Tree } from '@nx/devkit';
7
7
  * @returns A string if there is an error, otherwise undefined
8
8
  */
9
9
  export declare function validateProject(tree: Tree, project: ProjectConfiguration): string;
10
- //# sourceMappingURL=validate-project.d.ts.map
@@ -10,4 +10,3 @@ export declare function createCollectingLogger(): typeof devkitLogger & {
10
10
  flushLogs: (filter?: (message: string) => boolean) => void;
11
11
  };
12
12
  export {};
13
- //# sourceMappingURL=convert-to-inferred.d.ts.map
@@ -2,23 +2,23 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertToInferred = convertToInferred;
4
4
  exports.createCollectingLogger = createCollectingLogger;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const aggregate_log_util_1 = require("@nx/devkit/src/generators/plugin-migrations/aggregate-log-util");
7
- const executor_to_plugin_migrator_1 = require("@nx/devkit/src/generators/plugin-migrations/executor-to-plugin-migrator");
8
7
  const tsquery_1 = require("@phenomnomnominal/tsquery");
9
8
  const plugin_1 = require("../../plugins/plugin");
10
9
  const versions_1 = require("../../utils/versions");
11
10
  const utils_1 = require("./utils");
12
11
  const devkit_exports_1 = require("nx/src/devkit-exports");
13
12
  async function convertToInferred(tree, options) {
13
+ (0, versions_1.assertSupportedWebpackVersion)(tree);
14
14
  const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
15
15
  const migrationContext = {
16
- logger: new aggregate_log_util_1.AggregatedLog(),
16
+ logger: new internal_1.AggregatedLog(),
17
17
  projectGraph,
18
18
  workspaceRoot: tree.root,
19
19
  };
20
20
  const logger = createCollectingLogger();
21
- const migratedProjects = await (0, executor_to_plugin_migrator_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/webpack/plugin', plugin_1.createNodesV2, {
21
+ const migratedProjects = await (0, internal_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/webpack/plugin', plugin_1.createNodesV2, {
22
22
  buildTargetName: 'build',
23
23
  previewTargetName: 'preview',
24
24
  serveStaticTargetName: 'serve-static',
@@ -47,7 +47,7 @@ async function convertToInferred(tree, options) {
47
47
  }
48
48
  else {
49
49
  logger.flushLogs();
50
- throw new executor_to_plugin_migrator_1.NoTargetsToMigrateError();
50
+ throw new internal_1.NoTargetsToMigrateError();
51
51
  }
52
52
  }
53
53
  else {
@@ -1,4 +1,3 @@
1
1
  import * as ts from 'typescript';
2
2
  export declare function toPropertyAssignment(key: string, value: unknown): ts.PropertyAssignment;
3
3
  export declare function toExpression(value: unknown): ts.Expression;
4
- //# sourceMappingURL=ast.d.ts.map
@@ -4,4 +4,3 @@ export declare function buildPostTargetTransformerFactory(migrationContext: Migr
4
4
  projectName: string;
5
5
  root: string;
6
6
  }, inferredTarget: TargetConfiguration) => TargetConfiguration;
7
- //# sourceMappingURL=build-post-target-transformer.d.ts.map
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildPostTargetTransformerFactory = buildPostTargetTransformerFactory;
4
4
  const tslib_1 = require("tslib");
5
- const plugin_migration_utils_1 = require("@nx/devkit/src/generators/plugin-migrations/plugin-migration-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  const tsquery_1 = require("@phenomnomnominal/tsquery");
7
7
  const ts = tslib_1.__importStar(require("typescript"));
8
8
  const ast_1 = require("./ast");
@@ -16,7 +16,7 @@ function buildPostTargetTransformerFactory(migrationContext) {
16
16
  const { pluginOptions, webpackConfigPath } = processOptions(target, context);
17
17
  updateWebpackConfig(tree, webpackConfigPath, pluginOptions);
18
18
  if (target.outputs) {
19
- (0, plugin_migration_utils_1.processTargetOutputs)(target, [], inferredTarget, {
19
+ (0, internal_1.processTargetOutputs)(target, [], inferredTarget, {
20
20
  projectName: projectDetails.projectName,
21
21
  projectRoot: projectDetails.root,
22
22
  });
@@ -51,29 +51,29 @@ function extractPluginOptions(options, context, configName) {
51
51
  const pluginOptions = {};
52
52
  for (const [key, value] of Object.entries(options)) {
53
53
  if (pathOptions.has(key)) {
54
- pluginOptions[key] = (0, plugin_migration_utils_1.toProjectRelativePath)(value, context.projectRoot);
54
+ pluginOptions[key] = (0, internal_1.toProjectRelativePath)(value, context.projectRoot);
55
55
  delete options[key];
56
56
  }
57
57
  else if (assetsOptions.has(key)) {
58
58
  pluginOptions[key] = value.map((asset) => {
59
59
  if (typeof asset === 'string') {
60
- return (0, plugin_migration_utils_1.toProjectRelativePath)(asset, context.projectRoot);
60
+ return (0, internal_1.toProjectRelativePath)(asset, context.projectRoot);
61
61
  }
62
- asset.input = (0, plugin_migration_utils_1.toProjectRelativePath)(asset.input, context.projectRoot);
62
+ asset.input = (0, internal_1.toProjectRelativePath)(asset.input, context.projectRoot);
63
63
  return asset;
64
64
  });
65
65
  delete options[key];
66
66
  }
67
67
  else if (key === 'fileReplacements') {
68
68
  pluginOptions.fileReplacements = value.map((replacement) => ({
69
- replace: (0, plugin_migration_utils_1.toProjectRelativePath)(replacement.replace, context.projectRoot),
70
- with: (0, plugin_migration_utils_1.toProjectRelativePath)(replacement.with, context.projectRoot),
69
+ replace: (0, internal_1.toProjectRelativePath)(replacement.replace, context.projectRoot),
70
+ with: (0, internal_1.toProjectRelativePath)(replacement.with, context.projectRoot),
71
71
  }));
72
72
  delete options.fileReplacements;
73
73
  }
74
74
  else if (key === 'additionalEntryPoints') {
75
75
  pluginOptions.additionalEntryPoints = value.map((entryPoint) => {
76
- entryPoint.entryPath = (0, plugin_migration_utils_1.toProjectRelativePath)(entryPoint.entryPath, context.projectRoot);
76
+ entryPoint.entryPath = (0, internal_1.toProjectRelativePath)(entryPoint.entryPath, context.projectRoot);
77
77
  return entryPoint;
78
78
  });
79
79
  delete options.additionalEntryPoints;
@@ -1,4 +1,3 @@
1
1
  export * from './build-post-target-transformer';
2
2
  export * from './serve-post-target-transformer';
3
3
  export * from './types';
4
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@ export declare function servePostTargetTransformerFactory(migrationContext: Migr
4
4
  projectName: string;
5
5
  root: string;
6
6
  }, inferredTarget: TargetConfiguration) => Promise<TargetConfiguration>;
7
- //# sourceMappingURL=serve-post-target-transformer.d.ts.map
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.servePostTargetTransformerFactory = servePostTargetTransformerFactory;
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 plugin_migration_utils_1 = require("@nx/devkit/src/generators/plugin-migrations/plugin-migration-utils");
7
7
  const tsquery_1 = require("@phenomnomnominal/tsquery");
8
8
  const path_1 = require("path");
9
9
  const ts = tslib_1.__importStar(require("typescript"));
@@ -19,7 +19,7 @@ function servePostTargetTransformerFactory(migrationContext) {
19
19
  const { devServerOptions, webpackConfigPath } = await processOptions(tree, target, context);
20
20
  updateWebpackConfig(tree, webpackConfigPath, devServerOptions, context);
21
21
  if (target.outputs) {
22
- (0, plugin_migration_utils_1.processTargetOutputs)(target, [], inferredTarget, {
22
+ (0, internal_1.processTargetOutputs)(target, [], inferredTarget, {
23
23
  projectName: projectDetails.projectName,
24
24
  projectRoot: projectDetails.root,
25
25
  });
@@ -87,8 +87,8 @@ function extractDevServerOptions(options, context) {
87
87
  devServerOptions.server = { type: 'https' };
88
88
  if (options.sslCert && options.sslKey) {
89
89
  devServerOptions.server.options = {};
90
- devServerOptions.server.options.cert = (0, plugin_migration_utils_1.toProjectRelativePath)(options.sslCert, context.projectRoot);
91
- devServerOptions.server.options.key = (0, plugin_migration_utils_1.toProjectRelativePath)(options.sslKey, context.projectRoot);
90
+ devServerOptions.server.options.cert = (0, internal_1.toProjectRelativePath)(options.sslCert, context.projectRoot);
91
+ devServerOptions.server.options.key = (0, internal_1.toProjectRelativePath)(options.sslKey, context.projectRoot);
92
92
  }
93
93
  else if (options.sslCert) {
94
94
  context.logger.addLog({
@@ -1,5 +1,5 @@
1
1
  import type { ProjectGraph } from '@nx/devkit';
2
- import type { AggregatedLog } from '@nx/devkit/src/generators/plugin-migrations/aggregate-log-util';
2
+ import type { AggregatedLog } from '@nx/devkit/internal';
3
3
  export type MigrationContext = {
4
4
  logger: AggregatedLog;
5
5
  projectGraph: ProjectGraph;
@@ -9,4 +9,3 @@ export type TransformerContext = MigrationContext & {
9
9
  projectName: string;
10
10
  projectRoot: string;
11
11
  };
12
- //# sourceMappingURL=types.d.ts.map
@@ -3,4 +3,3 @@ import { Schema } from './schema';
3
3
  export declare function webpackInitGenerator(tree: Tree, schema: Schema): Promise<GeneratorCallback>;
4
4
  export declare function webpackInitGeneratorInternal(tree: Tree, schema: Schema): Promise<GeneratorCallback>;
5
5
  export default webpackInitGenerator;
6
- //# sourceMappingURL=init.d.ts.map