@nx/webpack 23.0.0-beta.5 → 23.0.0-beta.6

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 (28) hide show
  1. package/package.json +4 -4
  2. package/src/executors/dev-server/dev-server.impl.d.ts.map +1 -1
  3. package/src/executors/dev-server/dev-server.impl.js +2 -2
  4. package/src/executors/ssr-dev-server/ssr-dev-server.impl.d.ts.map +1 -1
  5. package/src/executors/ssr-dev-server/ssr-dev-server.impl.js +2 -2
  6. package/src/executors/webpack/webpack.impl.d.ts.map +1 -1
  7. package/src/executors/webpack/webpack.impl.js +2 -2
  8. package/src/generators/configuration/configuration.d.ts.map +1 -1
  9. package/src/generators/configuration/configuration.js +2 -2
  10. package/src/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin.d.ts.map +1 -1
  11. package/src/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin.js +2 -2
  12. package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +1 -1
  13. package/src/generators/convert-to-inferred/convert-to-inferred.js +4 -5
  14. package/src/generators/convert-to-inferred/utils/build-post-target-transformer.js +8 -8
  15. package/src/generators/convert-to-inferred/utils/serve-post-target-transformer.d.ts.map +1 -1
  16. package/src/generators/convert-to-inferred/utils/serve-post-target-transformer.js +4 -4
  17. package/src/generators/convert-to-inferred/utils/types.d.ts +1 -1
  18. package/src/generators/convert-to-inferred/utils/types.d.ts.map +1 -1
  19. package/src/generators/init/init.d.ts.map +1 -1
  20. package/src/generators/init/init.js +2 -2
  21. package/src/migrations/update-21-0-0/remove-isolated-config.d.ts.map +1 -1
  22. package/src/migrations/update-21-0-0/remove-isolated-config.js +2 -2
  23. package/src/plugins/plugin.d.ts.map +1 -1
  24. package/src/plugins/plugin.js +14 -24
  25. package/src/utils/e2e-web-server-info-utils.d.ts +1 -1
  26. package/src/utils/e2e-web-server-info-utils.d.ts.map +1 -1
  27. package/src/utils/e2e-web-server-info-utils.js +2 -2
  28. package/src/utils/webpack/resolve-user-defined-webpack-config.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/webpack",
3
- "version": "23.0.0-beta.5",
3
+ "version": "23.0.0-beta.6",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Webpack contains executors and generators that support building applications using Webpack.",
6
6
  "repository": {
@@ -65,11 +65,11 @@
65
65
  "webpack-dev-server": "^5.2.1",
66
66
  "webpack-node-externals": "^3.0.0",
67
67
  "webpack-subresource-integrity": "^5.1.0",
68
- "@nx/devkit": "23.0.0-beta.5",
69
- "@nx/js": "23.0.0-beta.5"
68
+ "@nx/devkit": "23.0.0-beta.6",
69
+ "@nx/js": "23.0.0-beta.6"
70
70
  },
71
71
  "devDependencies": {
72
- "nx": "23.0.0-beta.5"
72
+ "nx": "23.0.0-beta.6"
73
73
  },
74
74
  "publishConfig": {
75
75
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/dev-server/dev-server.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAGhB,MAAM,YAAY,CAAC;AAepB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAuB,iBAAiB,CACtC,YAAY,EAAE,mBAAmB,EACjC,OAAO,EAAE,eAAe;;;aAoGzB;AA0BD,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/dev-server/dev-server.impl.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EAGhB,MAAM,YAAY,CAAC;AAcpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAI/C,wBAAuB,iBAAiB,CACtC,YAAY,EAAE,mBAAmB,EACjC,OAAO,EAAE,eAAe;;;aAoGzB;AA0BD,eAAe,iBAAiB,CAAC"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.devServerExecutor = devServerExecutor;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const webpack_1 = tslib_1.__importDefault(require("webpack"));
6
7
  const devkit_1 = require("@nx/devkit");
7
- const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
8
8
  const operators_1 = require("rxjs/operators");
9
9
  const webpack_dev_server_1 = tslib_1.__importDefault(require("webpack-dev-server"));
10
10
  const get_dev_server_config_1 = require("./lib/get-dev-server-config");
@@ -61,7 +61,7 @@ async function* devServerExecutor(serveOptions, context) {
61
61
  config.devServer ??= devServer;
62
62
  }
63
63
  }
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 }) => {
64
+ return yield* (0, internal_1.eachValueFrom)((0, run_webpack_1.runWebpackDevServer)(config, webpack_1.default, webpack_dev_server_1.default).pipe((0, operators_1.tap)(({ stats }) => {
65
65
  console.info(stats.toString(config.stats));
66
66
  }), (0, operators_1.map)(({ baseUrl, stats }) => {
67
67
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/ssr-dev-server/ssr-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGjE,wBAAuB,oBAAoB,CACzC,OAAO,EAAE,sBAAsB,EAC/B,OAAO,EAAE,eAAe;;aA0Bb,OAAO;aAEP,aAAa;kBA6BzB;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"ssr-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/ssr-dev-server/ssr-dev-server.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGjE,wBAAuB,oBAAoB,CACzC,OAAO,EAAE,sBAAsB,EAC/B,OAAO,EAAE,eAAe;;aA0Bb,OAAO;aAEP,aAAa;kBA6BzB;AAED,eAAe,oBAAoB,CAAC"}
@@ -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 +1 @@
1
- {"version":3,"file":"webpack.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/webpack/webpack.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAkBpB,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,UAAU,CAAC;AA6ClB,MAAM,MAAM,oBAAoB,GAC5B;IACE,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,GACD;IACE,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,CAAC;AAEN,wBAAuB,eAAe,CACpC,QAAQ,EAAE,sBAAsB,EAChC,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,SAAS,CAAC,CA6FvE;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"webpack.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/executors/webpack/webpack.impl.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAIhB,MAAM,YAAY,CAAC;AAiBpB,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,UAAU,CAAC;AA6ClB,MAAM,MAAM,oBAAoB,GAC5B;IACE,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,GACD;IACE,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC,CAAC;AAEN,wBAAuB,eAAe,CACpC,QAAQ,EAAE,sBAAsB,EAChC,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,SAAS,CAAC,CA6FvE;AAED,eAAe,eAAe,CAAC"}
@@ -1,8 +1,8 @@
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
7
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
8
  const path_1 = require("path");
@@ -83,7 +83,7 @@ async function* webpackExecutor(_options, context) {
83
83
  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
84
  }
85
85
  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))),
86
+ 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
87
  // Run build sequentially and bail when first one fails.
88
88
  (0, operators_1.mergeScan)((acc, config) => {
89
89
  if (!acc.hasErrors()) {
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/configuration/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAOxD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,4BAA4B,8BAGtC;AAED,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,4BAA4B,8BAoCtC;AA6LD,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/configuration/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAMjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAMxD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,4BAA4B,8BAGtC;AAED,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,4BAA4B,8BAoCtC;AA6LD,eAAe,sBAAsB,CAAC"}
@@ -2,10 +2,10 @@
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
9
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
10
10
  const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
11
11
  function configurationGenerator(tree, options) {
@@ -128,7 +128,7 @@ module.exports = composePlugins(withNx(), (config) => {
128
128
  }
129
129
  }
130
130
  function addBuildTarget(tree, options) {
131
- (0, target_defaults_utils_1.addBuildTargetDefaults)(tree, '@nx/webpack:webpack', 'build', [
131
+ (0, internal_1.addBuildTargetDefaults)(tree, '@nx/webpack:webpack', 'build', [
132
132
  ts_solution_setup_1.TS_SOLUTION_SETUP_TSCONFIG_INPUT,
133
133
  ]);
134
134
  const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
@@ -1 +1 @@
1
- {"version":3,"file":"convert-config-to-webpack-plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,IAAI,EAIL,MAAM,YAAY,CAAC;AAQpB,UAAU,MAAM;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAWD,wBAAsB,qCAAqC,CACzD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,iBAwGhB;AAED,eAAe,qCAAqC,CAAC"}
1
+ {"version":3,"file":"convert-config-to-webpack-plugin.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,IAAI,EAIL,MAAM,YAAY,CAAC;AAOpB,UAAU,MAAM;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAWD,wBAAsB,qCAAqC,CACzD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,iBAwGhB;AAED,eAAe,qCAAqC,CAAC"}
@@ -1,8 +1,8 @@
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");
@@ -18,7 +18,7 @@ const preprocessText = (text) => {
18
18
  async function convertConfigToWebpackPluginGenerator(tree, options) {
19
19
  let migrated = 0;
20
20
  const projects = (0, devkit_1.getProjects)(tree);
21
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (currentTargetOptions, projectName, targetName, configurationName) => {
21
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (currentTargetOptions, projectName, targetName, configurationName) => {
22
22
  if (options.project && projectName !== options.project) {
23
23
  return;
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"convert-to-inferred.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/convert-to-inferred/convert-to-inferred.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAepB,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE/D,UAAU,MAAM;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mDAyElE;AA6CD,wBAAgB,sBAAsB,IAAI,OAAO,YAAY,GAAG;IAC9D,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACtC,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,KAAK,IAAI,CAAC;CAC5D,CAkCA"}
1
+ {"version":3,"file":"convert-to-inferred.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/convert-to-inferred/convert-to-inferred.ts"],"names":[],"mappings":"AAKA,OAAO,EAML,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAUpB,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE/D,UAAU,MAAM;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mDAyElE;AA6CD,wBAAgB,sBAAsB,IAAI,OAAO,YAAY,GAAG;IAC9D,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACtC,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,KAAK,IAAI,CAAC;CAC5D,CAkCA"}
@@ -2,9 +2,8 @@
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");
@@ -13,12 +12,12 @@ const devkit_exports_1 = require("nx/src/devkit-exports");
13
12
  async function convertToInferred(tree, options) {
14
13
  const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
15
14
  const migrationContext = {
16
- logger: new aggregate_log_util_1.AggregatedLog(),
15
+ logger: new internal_1.AggregatedLog(),
17
16
  projectGraph,
18
17
  workspaceRoot: tree.root,
19
18
  };
20
19
  const logger = createCollectingLogger();
21
- const migratedProjects = await (0, executor_to_plugin_migrator_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/webpack/plugin', plugin_1.createNodesV2, {
20
+ const migratedProjects = await (0, internal_1.migrateProjectExecutorsToPlugin)(tree, projectGraph, '@nx/webpack/plugin', plugin_1.createNodesV2, {
22
21
  buildTargetName: 'build',
23
22
  previewTargetName: 'preview',
24
23
  serveStaticTargetName: 'serve-static',
@@ -47,7 +46,7 @@ async function convertToInferred(tree, options) {
47
46
  }
48
47
  else {
49
48
  logger.flushLogs();
50
- throw new executor_to_plugin_migrator_1.NoTargetsToMigrateError();
49
+ throw new internal_1.NoTargetsToMigrateError();
51
50
  }
52
51
  }
53
52
  else {
@@ -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 +1 @@
1
- {"version":3,"file":"serve-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/webpack/src/generators/convert-to-inferred/utils/serve-post-target-transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,mBAAmB,EACxB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAYpB,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,SAAS,CAAC;AAEpE,wBAAgB,iCAAiC,CAC/C,gBAAgB,EAAE,gBAAgB,IAGhC,QAAQ,mBAAmB,EAC3B,MAAM,IAAI,EACV,gBAAgB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,gBAAgB,mBAAmB,KAClC,OAAO,CAAC,mBAAmB,CAAC,CAwBhC"}
1
+ {"version":3,"file":"serve-post-target-transformer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/webpack/src/generators/convert-to-inferred/utils/serve-post-target-transformer.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,KAAK,mBAAmB,EACxB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAQpB,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,SAAS,CAAC;AAEpE,wBAAgB,iCAAiC,CAC/C,gBAAgB,EAAE,gBAAgB,IAGhC,QAAQ,mBAAmB,EAC3B,MAAM,IAAI,EACV,gBAAgB;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrD,gBAAgB,mBAAmB,KAClC,OAAO,CAAC,mBAAmB,CAAC,CAwBhC"}
@@ -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;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/webpack/src/generators/convert-to-inferred/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gEAAgE,CAAC;AAEpG,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/webpack/src/generators/convert-to-inferred/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/init/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAE9D;AAED,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAkF5E;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/generators/init/init.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAEjB,IAAI,EACL,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAE9D;AAED,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAkF5E;AAED,eAAe,oBAAoB,CAAC"}
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.webpackInitGenerator = webpackInitGenerator;
4
4
  exports.webpackInitGeneratorInternal = webpackInitGeneratorInternal;
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
7
7
  const plugin_1 = require("../../plugins/plugin");
8
8
  const versions_1 = require("../../utils/versions");
9
9
  function webpackInitGenerator(tree, schema) {
@@ -15,7 +15,7 @@ async function webpackInitGeneratorInternal(tree, schema) {
15
15
  nxJson.useInferencePlugins !== false;
16
16
  schema.addPlugin ??= addPluginDefault;
17
17
  if (schema.addPlugin) {
18
- await (0, add_plugin_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/webpack/plugin', plugin_1.createNodesV2, {
18
+ await (0, internal_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/webpack/plugin', plugin_1.createNodesV2, {
19
19
  buildTargetName: [
20
20
  'build',
21
21
  'webpack:build',
@@ -1 +1 @@
1
- {"version":3,"file":"remove-isolated-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/migrations/update-21-0-0/remove-isolated-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,IAAI,EAEL,MAAM,YAAY,CAAC;AAIpB,yBAA+B,IAAI,EAAE,IAAI,iBAkDxC"}
1
+ {"version":3,"file":"remove-isolated-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/webpack/src/migrations/update-21-0-0/remove-isolated-config.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,EAEL,MAAM,YAAY,CAAC;AAGpB,yBAA+B,IAAI,EAAE,IAAI,iBAkDxC"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
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
  async function default_1(tree) {
7
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (options, projectName, targetName, configurationName) => {
7
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (options, projectName, targetName, configurationName) => {
8
8
  // Only handle webpack config for default configuration
9
9
  if (configurationName)
10
10
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/webpack/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAIlB,aAAa,EASd,MAAM,YAAY,CAAC;AAgBpB,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAqBD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,oBAAoB,CAiC3D,CAAC;AAEF,eAAO,MAAM,aAAa,qCAAc,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/webpack/src/plugins/plugin.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,kBAAkB,EAIlB,aAAa,EAOd,MAAM,YAAY,CAAC;AAcpB,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAID;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAEhC,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,oBAAoB,CAkC3D,CAAC;AAEF,eAAO,MAAM,aAAa,qCAAc,CAAC"}
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createNodesV2 = exports.createNodes = exports.createDependencies = void 0;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
6
- const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
7
6
  const js_1 = require("@nx/js");
8
7
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
8
  const fs_1 = require("fs");
@@ -13,19 +12,6 @@ const path_1 = require("path");
13
12
  const read_webpack_options_1 = require("../utils/webpack/read-webpack-options");
14
13
  const resolve_user_defined_webpack_config_1 = require("../utils/webpack/resolve-user-defined-webpack-config");
15
14
  const util_1 = require("@nx/js/src/plugins/typescript/util");
16
- function readTargetsCache(cachePath) {
17
- try {
18
- return process.env.NX_CACHE_PROJECT_GRAPH !== 'false'
19
- ? (0, devkit_1.readJsonFile)(cachePath)
20
- : {};
21
- }
22
- catch {
23
- return {};
24
- }
25
- }
26
- function writeTargetsToCache(cachePath, results) {
27
- (0, devkit_1.writeJsonFile)(cachePath, results);
28
- }
29
15
  /**
30
16
  * @deprecated The 'createDependencies' function is now a no-op. This functionality is included in 'createNodesV2'.
31
17
  */
@@ -39,20 +25,22 @@ exports.createNodes = [
39
25
  async (configFilePaths, options, context) => {
40
26
  const optionsHash = (0, file_hasher_1.hashObject)(options);
41
27
  const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `webpack-${optionsHash}.hash`);
42
- const targetsCache = readTargetsCache(cachePath);
28
+ const targetsCache = new internal_1.PluginCache(cachePath);
43
29
  const normalizedOptions = normalizeOptions(options);
44
30
  const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)();
45
- const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
31
+ const packageManager = (0, devkit_1.detectPackageManager)(context.workspaceRoot);
32
+ const pmc = (0, devkit_1.getPackageManagerCommand)(packageManager);
33
+ const lockFileName = (0, js_1.getLockFileName)(packageManager);
46
34
  try {
47
- return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, isTsSolutionSetup, pmc), configFilePaths, normalizedOptions, context);
35
+ return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, targetsCache, isTsSolutionSetup, pmc, lockFileName), configFilePaths, normalizedOptions, context);
48
36
  }
49
37
  finally {
50
- writeTargetsToCache(cachePath, targetsCache);
38
+ targetsCache.writeToDisk();
51
39
  }
52
40
  },
53
41
  ];
54
42
  exports.createNodesV2 = exports.createNodes;
55
- async function createNodesInternal(configFilePath, options, context, targetsCache, isTsSolutionSetup, pmc) {
43
+ async function createNodesInternal(configFilePath, options, context, targetsCache, isTsSolutionSetup, pmc, lockFileName) {
56
44
  const projectRoot = (0, path_1.dirname)(configFilePath);
57
45
  // Do not create a project if package.json and project.json isn't there.
58
46
  const siblingFiles = (0, fs_1.readdirSync)((0, path_1.join)(context.workspaceRoot, projectRoot));
@@ -60,9 +48,11 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
60
48
  !siblingFiles.includes('project.json')) {
61
49
  return {};
62
50
  }
63
- const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, options, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
64
- targetsCache[hash] ??= await createWebpackTargets(configFilePath, projectRoot, options, context, isTsSolutionSetup, pmc);
65
- const { targets, metadata } = targetsCache[hash];
51
+ const hash = await (0, internal_1.calculateHashForCreateNodes)(projectRoot, options, context, [lockFileName]);
52
+ if (!targetsCache.has(hash)) {
53
+ targetsCache.set(hash, await createWebpackTargets(configFilePath, projectRoot, options, context, isTsSolutionSetup, pmc));
54
+ }
55
+ const { targets, metadata } = targetsCache.get(hash);
66
56
  return {
67
57
  projects: {
68
58
  [projectRoot]: {
@@ -74,7 +64,7 @@ async function createNodesInternal(configFilePath, options, context, targetsCach
74
64
  };
75
65
  }
76
66
  async function createWebpackTargets(configFilePath, projectRoot, options, context, isTsSolutionSetup, pmc) {
77
- const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
67
+ const namedInputs = (0, internal_1.getNamedInputs)(projectRoot, context);
78
68
  const webpackConfig = (0, resolve_user_defined_webpack_config_1.resolveUserDefinedWebpackConfig)((0, path_1.join)(context.workspaceRoot, configFilePath), (0, js_1.getRootTsConfigPath)(), true);
79
69
  const webpackOptions = await (0, read_webpack_options_1.readWebpackOptions)(webpackConfig);
80
70
  const outputs = [];
@@ -1,3 +1,3 @@
1
1
  import { type Tree } from '@nx/devkit';
2
- export declare function getWebpackE2EWebServerInfo(tree: Tree, projectName: string, configFilePath: string, isPluginBeingAdded: boolean, e2ePortOverride?: number): Promise<import("@nx/devkit/src/generators/e2e-web-server-info-utils").E2EWebServerDetails>;
2
+ export declare function getWebpackE2EWebServerInfo(tree: Tree, projectName: string, configFilePath: string, isPluginBeingAdded: boolean, e2ePortOverride?: number): Promise<import("@nx/devkit/internal").E2EWebServerDetails>;
3
3
  //# sourceMappingURL=e2e-web-server-info-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"e2e-web-server-info-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/webpack/src/utils/e2e-web-server-info-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAC;AAGnD,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,CAAC,EAAE,MAAM,8FA8BzB"}
1
+ {"version":3,"file":"e2e-web-server-info-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/webpack/src/utils/e2e-web-server-info-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,YAAY,CAAC;AAGnD,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,CAAC,EAAE,MAAM,8DA8BzB"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getWebpackE2EWebServerInfo = getWebpackE2EWebServerInfo;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const e2e_web_server_info_utils_1 = require("@nx/devkit/src/generators/e2e-web-server-info-utils");
5
+ const internal_1 = require("@nx/devkit/internal");
6
6
  async function getWebpackE2EWebServerInfo(tree, projectName, configFilePath, isPluginBeingAdded, e2ePortOverride) {
7
7
  const nxJson = (0, devkit_1.readNxJson)(tree);
8
8
  let e2ePort = e2ePortOverride ?? 4200;
@@ -10,7 +10,7 @@ async function getWebpackE2EWebServerInfo(tree, projectName, configFilePath, isP
10
10
  nxJson.targetDefaults?.['serve'].options?.port) {
11
11
  e2ePort = nxJson.targetDefaults?.['serve'].options?.port;
12
12
  }
13
- return (0, e2e_web_server_info_utils_1.getE2EWebServerInfo)(tree, projectName, {
13
+ return (0, internal_1.getE2EWebServerInfo)(tree, projectName, {
14
14
  plugin: '@nx/webpack/plugin',
15
15
  serveTargetName: 'serveTargetName',
16
16
  serveStaticTargetName: 'serveStaticTargetName',
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveUserDefinedWebpackConfig = resolveUserDefinedWebpackConfig;
4
- const internal_1 = require("@nx/js/src/internal");
5
- const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
4
+ const internal_1 = require("@nx/devkit/internal");
5
+ const internal_2 = require("@nx/js/src/internal");
6
6
  function resolveUserDefinedWebpackConfig(path, tsConfig,
7
7
  /** Skip require cache and return latest content */
8
8
  reload = false) {
@@ -10,7 +10,7 @@ reload = false) {
10
10
  // Clear cache if the path is in the cache
11
11
  if (require.cache[path]) {
12
12
  // Clear all entries because config may import other modules
13
- (0, config_utils_1.clearRequireCache)();
13
+ (0, internal_1.clearRequireCache)();
14
14
  }
15
15
  }
16
16
  // Don't transpile non-TS files. This prevents workspaces libs from being registered via tsconfig-paths.
@@ -18,7 +18,7 @@ reload = false) {
18
18
  if (!/\.(ts|mts|cts)$/.test(path)) {
19
19
  return require(path);
20
20
  }
21
- const cleanupTranspiler = (0, internal_1.registerTsProject)(tsConfig);
21
+ const cleanupTranspiler = (0, internal_2.registerTsProject)(tsConfig);
22
22
  const maybeCustomWebpackConfig = require(path);
23
23
  cleanupTranspiler();
24
24
  // If the user provides a configuration in TS file