@nx/webpack 19.4.3 → 19.5.0-beta.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 (57) hide show
  1. package/package.json +5 -4
  2. package/src/executors/dev-server/dev-server.impl.js +1 -2
  3. package/src/executors/dev-server/lib/get-dev-server-config.js +1 -2
  4. package/src/executors/dev-server/lib/serve-path.js +2 -3
  5. package/src/executors/ssr-dev-server/lib/wait-until-server-is-listening.js +1 -2
  6. package/src/executors/ssr-dev-server/ssr-dev-server.impl.js +1 -2
  7. package/src/executors/webpack/lib/normalize-options.js +2 -3
  8. package/src/executors/webpack/lib/run-webpack.js +1 -2
  9. package/src/executors/webpack/webpack.impl.js +1 -2
  10. package/src/generators/configuration/configuration.js +2 -3
  11. package/src/generators/convert-config-to-webpack-plugin/convert-config-to-webpack-plugin.js +1 -2
  12. package/src/generators/convert-config-to-webpack-plugin/lib/extract-webpack-options.js +1 -2
  13. package/src/generators/convert-config-to-webpack-plugin/lib/normalize-path-options.js +1 -2
  14. package/src/generators/convert-config-to-webpack-plugin/lib/utils.js +1 -2
  15. package/src/generators/convert-config-to-webpack-plugin/lib/validate-project.js +1 -2
  16. package/src/generators/convert-to-inferred/convert-to-inferred.js +1 -2
  17. package/src/generators/convert-to-inferred/utils/ast.js +2 -3
  18. package/src/generators/convert-to-inferred/utils/build-post-target-transformer.js +1 -2
  19. package/src/generators/convert-to-inferred/utils/serve-post-target-transformer.js +1 -2
  20. package/src/generators/init/init.js +2 -3
  21. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +1 -1
  22. package/src/migrations/update-17-2-1/webpack-config-setup.js +1 -1
  23. package/src/plugins/nx-webpack-plugin/lib/apply-base-config.js +1 -2
  24. package/src/plugins/nx-webpack-plugin/lib/apply-web-config.js +1 -2
  25. package/src/plugins/nx-webpack-plugin/lib/compiler-loaders.js +1 -2
  26. package/src/plugins/nx-webpack-plugin/lib/get-terser-ecma-version.js +1 -2
  27. package/src/plugins/nx-webpack-plugin/lib/instantiate-script-plugins.js +1 -2
  28. package/src/plugins/nx-webpack-plugin/lib/normalize-options.js +3 -4
  29. package/src/plugins/nx-webpack-plugin/lib/stylesheet-loaders.js +3 -4
  30. package/src/plugins/use-legacy-nx-plugin/use-legacy-nx-plugin.js +1 -2
  31. package/src/plugins/webpack-nx-build-coordination-plugin.js +8 -1
  32. package/src/utils/config.js +4 -4
  33. package/src/utils/create-copy-plugin.js +1 -2
  34. package/src/utils/ensure-dependencies.js +1 -2
  35. package/src/utils/fs.js +3 -4
  36. package/src/utils/get-client-environment.js +1 -2
  37. package/src/utils/get-css-module-local-ident.js +1 -2
  38. package/src/utils/has-plugin.js +1 -2
  39. package/src/utils/hash-format.js +1 -2
  40. package/src/utils/module-federation/dependencies.js +1 -2
  41. package/src/utils/module-federation/get-remotes-for-host.js +2 -3
  42. package/src/utils/module-federation/models/index.d.ts +2 -0
  43. package/src/utils/module-federation/package-json.js +1 -2
  44. package/src/utils/module-federation/remotes.js +2 -3
  45. package/src/utils/module-federation/secondary-entry-points.js +4 -5
  46. package/src/utils/module-federation/share.js +5 -6
  47. package/src/utils/module-federation/typescript.js +3 -4
  48. package/src/utils/run-webpack.js +1 -2
  49. package/src/utils/webpack/deprecated-stylus-loader.js +1 -1
  50. package/src/utils/webpack/interpolate-env-variables-to-index.js +1 -2
  51. package/src/utils/webpack/normalize-entry.js +1 -2
  52. package/src/utils/webpack/package-chunk-sort.js +1 -2
  53. package/src/utils/webpack/plugins/postcss-cli-resources.js +1 -2
  54. package/src/utils/webpack/read-webpack-options.js +1 -2
  55. package/src/utils/webpack/resolve-user-defined-webpack-config.js +1 -2
  56. package/src/utils/with-nx.js +1 -2
  57. package/src/utils/with-web.js +1 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/webpack",
3
- "version": "19.4.3",
3
+ "version": "19.5.0-beta.1",
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": {
@@ -32,6 +32,7 @@
32
32
  "dependencies": {
33
33
  "@babel/core": "^7.23.2",
34
34
  "@phenomnomnominal/tsquery": "~5.0.1",
35
+ "@module-federation/sdk": "^0.2.3",
35
36
  "ajv": "^8.12.0",
36
37
  "autoprefixer": "^10.4.9",
37
38
  "babel-loader": "^9.1.2",
@@ -65,9 +66,9 @@
65
66
  "webpack-dev-server": "^4.9.3",
66
67
  "webpack-node-externals": "^3.0.0",
67
68
  "webpack-subresource-integrity": "^5.1.0",
68
- "@nx/devkit": "19.4.3",
69
- "@nx/js": "19.4.3",
70
- "@nrwl/webpack": "19.4.3"
69
+ "@nx/devkit": "19.5.0-beta.1",
70
+ "@nx/js": "19.5.0-beta.1",
71
+ "@nrwl/webpack": "19.5.0-beta.1"
71
72
  },
72
73
  "publishConfig": {
73
74
  "access": "public"
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.devServerExecutor = void 0;
3
+ exports.devServerExecutor = devServerExecutor;
4
4
  const webpack = require("webpack");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
@@ -69,7 +69,6 @@ async function* devServerExecutor(serveOptions, context) {
69
69
  };
70
70
  })));
71
71
  }
72
- exports.devServerExecutor = devServerExecutor;
73
72
  function getBuildOptions(options, context) {
74
73
  const target = (0, devkit_1.parseTargetString)(options.buildTarget, context);
75
74
  const overrides = {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDevServerOptions = void 0;
3
+ exports.getDevServerOptions = getDevServerOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const path = require("path");
6
6
  const fs_1 = require("fs");
@@ -66,7 +66,6 @@ function getDevServerOptions(root, serveOptions, buildOptions) {
66
66
  }
67
67
  return config;
68
68
  }
69
- exports.getDevServerOptions = getDevServerOptions;
70
69
  function getSslConfig(root, options) {
71
70
  return {
72
71
  key: (0, fs_1.readFileSync)(path.resolve(root, options.sslKey), 'utf-8'),
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._findDefaultServePath = exports.buildServePath = void 0;
3
+ exports.buildServePath = buildServePath;
4
+ exports._findDefaultServePath = _findDefaultServePath;
4
5
  function buildServePath(browserOptions) {
5
6
  let servePath = _findDefaultServePath(browserOptions.baseHref, browserOptions.deployUrl) ||
6
7
  '/';
@@ -12,7 +13,6 @@ function buildServePath(browserOptions) {
12
13
  }
13
14
  return servePath;
14
15
  }
15
- exports.buildServePath = buildServePath;
16
16
  function _findDefaultServePath(baseHref, deployUrl) {
17
17
  if (!baseHref && !deployUrl) {
18
18
  return '';
@@ -42,4 +42,3 @@ function _findDefaultServePath(baseHref, deployUrl) {
42
42
  // Join together baseHref and deployUrl
43
43
  return `${normalizedBaseHref}${deployUrl || ''}`;
44
44
  }
45
- exports._findDefaultServePath = _findDefaultServePath;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.waitUntilServerIsListening = void 0;
3
+ exports.waitUntilServerIsListening = waitUntilServerIsListening;
4
4
  const net = require("net");
5
5
  function waitUntilServerIsListening(port) {
6
6
  const allowedErrorCodes = ['ECONNREFUSED', 'ECONNRESET'];
@@ -36,4 +36,3 @@ function waitUntilServerIsListening(port) {
36
36
  listen();
37
37
  });
38
38
  }
39
- exports.waitUntilServerIsListening = waitUntilServerIsListening;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ssrDevServerExecutor = void 0;
3
+ exports.ssrDevServerExecutor = ssrDevServerExecutor;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const chalk = require("chalk");
6
6
  const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
@@ -35,5 +35,4 @@ async function* ssrDevServerExecutor(options, context) {
35
35
  }
36
36
  }
37
37
  }
38
- exports.ssrDevServerExecutor = ssrDevServerExecutor;
39
38
  exports.default = ssrDevServerExecutor;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizePluginPath = exports.normalizeOptions = void 0;
3
+ exports.normalizeOptions = normalizeOptions;
4
+ exports.normalizePluginPath = normalizePluginPath;
4
5
  const path_1 = require("path");
5
6
  const normalize_options_1 = require("../../../plugins/nx-webpack-plugin/lib/normalize-options");
6
7
  function normalizeOptions(options, root, projectRoot, sourceRoot) {
@@ -26,7 +27,6 @@ function normalizeOptions(options, root, projectRoot, sourceRoot) {
26
27
  }
27
28
  return normalizedOptions;
28
29
  }
29
- exports.normalizeOptions = normalizeOptions;
30
30
  function normalizePluginPath(pluginPath, root) {
31
31
  if (!pluginPath) {
32
32
  return '';
@@ -38,4 +38,3 @@ function normalizePluginPath(pluginPath, root) {
38
38
  return (0, path_1.resolve)(root, pluginPath);
39
39
  }
40
40
  }
41
- exports.normalizePluginPath = normalizePluginPath;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runWebpack = void 0;
3
+ exports.runWebpack = runWebpack;
4
4
  const webpack = require("webpack");
5
5
  const rxjs_1 = require("rxjs");
6
6
  // TODO(jack): move to dev-server executor
@@ -33,4 +33,3 @@ function runWebpack(config) {
33
33
  }
34
34
  });
35
35
  }
36
- exports.runWebpack = runWebpack;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.webpackExecutor = void 0;
3
+ exports.webpackExecutor = webpackExecutor;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const rxjs_for_await_1 = require("@nx/devkit/src/utils/rxjs-for-await");
6
6
  const rxjs_1 = require("rxjs");
@@ -120,5 +120,4 @@ async function* webpackExecutor(_options, context) {
120
120
  };
121
121
  })));
122
122
  }
123
- exports.webpackExecutor = webpackExecutor;
124
123
  exports.default = webpackExecutor;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.configurationGeneratorInternal = exports.configurationGenerator = void 0;
3
+ exports.configurationGenerator = configurationGenerator;
4
+ exports.configurationGeneratorInternal = configurationGeneratorInternal;
4
5
  const devkit_1 = require("@nx/devkit");
5
6
  const init_1 = require("../init/init");
6
7
  const has_plugin_1 = require("../../utils/has-plugin");
@@ -9,7 +10,6 @@ const ensure_dependencies_1 = require("../../utils/ensure-dependencies");
9
10
  function configurationGenerator(tree, options) {
10
11
  return configurationGeneratorInternal(tree, { addPlugin: false, ...options });
11
12
  }
12
- exports.configurationGenerator = configurationGenerator;
13
13
  async function configurationGeneratorInternal(tree, options) {
14
14
  const tasks = [];
15
15
  const nxJson = (0, devkit_1.readNxJson)(tree);
@@ -38,7 +38,6 @@ async function configurationGeneratorInternal(tree, options) {
38
38
  }
39
39
  return (0, devkit_1.runTasksInSerial)(...tasks);
40
40
  }
41
- exports.configurationGeneratorInternal = configurationGeneratorInternal;
42
41
  function checkForTargetConflicts(tree, options) {
43
42
  if (options.skipValidation)
44
43
  return;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertConfigToWebpackPluginGenerator = void 0;
3
+ exports.convertConfigToWebpackPluginGenerator = convertConfigToWebpackPluginGenerator;
4
4
  const devkit_1 = require("@nx/devkit");
5
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");
@@ -89,5 +89,4 @@ async function convertConfigToWebpackPluginGenerator(tree, options) {
89
89
  await (0, devkit_1.formatFiles)(tree);
90
90
  }
91
91
  }
92
- exports.convertConfigToWebpackPluginGenerator = convertConfigToWebpackPluginGenerator;
93
92
  exports.default = convertConfigToWebpackPluginGenerator;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractWebpackOptions = void 0;
3
+ exports.extractWebpackOptions = extractWebpackOptions;
4
4
  const tsquery_1 = require("@phenomnomnominal/tsquery");
5
5
  const ts = require("typescript");
6
6
  function extractWebpackOptions(tree, webpackConfigPath) {
@@ -40,7 +40,6 @@ function extractWebpackOptions(tree, webpackConfigPath) {
40
40
  }
41
41
  return { withNxConfig, withReactConfig };
42
42
  }
43
- exports.extractWebpackOptions = extractWebpackOptions;
44
43
  function removeCallExpressions(source, functionNames) {
45
44
  let modifiedSource = source;
46
45
  functionNames.forEach((functionName) => {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizePathOptions = void 0;
3
+ exports.normalizePathOptions = normalizePathOptions;
4
4
  const utils_1 = require("./utils");
5
5
  const executorFieldsToNormalize = [
6
6
  'outputPath',
@@ -26,7 +26,6 @@ function normalizePathOptions(projectRoot, options) {
26
26
  }
27
27
  return options;
28
28
  }
29
- exports.normalizePathOptions = normalizePathOptions;
30
29
  function normalizePath(projectRoot, key, value) {
31
30
  if (!value)
32
31
  return value;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toProjectRelativePath = void 0;
3
+ exports.toProjectRelativePath = toProjectRelativePath;
4
4
  const posix_1 = require("path/posix");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  function toProjectRelativePath(path, projectRoot) {
@@ -11,4 +11,3 @@ function toProjectRelativePath(path, projectRoot) {
11
11
  const relativePath = (0, posix_1.relative)((0, posix_1.resolve)(devkit_1.workspaceRoot, projectRoot), (0, posix_1.resolve)(devkit_1.workspaceRoot, path));
12
12
  return relativePath.startsWith('.') ? relativePath : `./${relativePath}`;
13
13
  }
14
- exports.toProjectRelativePath = toProjectRelativePath;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateProject = void 0;
3
+ exports.validateProject = validateProject;
4
4
  function hasAnotherWebpackConfig(tree, projectRoot) {
5
5
  const files = tree.children(projectRoot);
6
6
  const projectJsonString = tree.read(`${projectRoot}/project.json`, 'utf-8');
@@ -41,4 +41,3 @@ function validateProject(tree, project) {
41
41
  const hasAnotherConfig = hasAnotherWebpackConfig(tree, project.root);
42
42
  return hasAnotherConfig || isNestProject(project);
43
43
  }
44
- exports.validateProject = validateProject;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertToInferred = void 0;
3
+ exports.convertToInferred = convertToInferred;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const aggregate_log_util_1 = require("@nx/devkit/src/generators/plugin-migrations/aggregate-log-util");
6
6
  const executor_to_plugin_migrator_1 = require("@nx/devkit/src/generators/plugin-migrations/executor-to-plugin-migrator");
@@ -45,7 +45,6 @@ async function convertToInferred(tree, options) {
45
45
  migrationContext.logger.flushLogs();
46
46
  });
47
47
  }
48
- exports.convertToInferred = convertToInferred;
49
48
  function skipProjectFilterFactory(tree) {
50
49
  return function skipProjectFilter(projectConfiguration) {
51
50
  const buildTarget = Object.values(projectConfiguration.targets).find((target) => target.executor === '@nx/webpack:webpack' ||
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toExpression = exports.toPropertyAssignment = void 0;
3
+ exports.toPropertyAssignment = toPropertyAssignment;
4
+ exports.toExpression = toExpression;
4
5
  const ts = require("typescript");
5
6
  function toPropertyAssignment(key, value) {
6
7
  if (typeof value === 'string') {
@@ -19,7 +20,6 @@ function toPropertyAssignment(key, value) {
19
20
  return ts.factory.createPropertyAssignment(ts.factory.createStringLiteral(key), ts.factory.createObjectLiteralExpression(Object.entries(value).map(([key, value]) => toPropertyAssignment(key, value))));
20
21
  }
21
22
  }
22
- exports.toPropertyAssignment = toPropertyAssignment;
23
23
  function toExpression(value) {
24
24
  if (typeof value === 'string') {
25
25
  return ts.factory.createStringLiteral(value);
@@ -37,4 +37,3 @@ function toExpression(value) {
37
37
  return ts.factory.createObjectLiteralExpression(Object.entries(value).map(([key, value]) => toPropertyAssignment(key, value)));
38
38
  }
39
39
  }
40
- exports.toExpression = toExpression;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildPostTargetTransformerFactory = void 0;
3
+ exports.buildPostTargetTransformerFactory = buildPostTargetTransformerFactory;
4
4
  const plugin_migration_utils_1 = require("@nx/devkit/src/generators/plugin-migrations/plugin-migration-utils");
5
5
  const tsquery_1 = require("@phenomnomnominal/tsquery");
6
6
  const ts = require("typescript");
@@ -23,7 +23,6 @@ function buildPostTargetTransformerFactory(migrationContext) {
23
23
  return target;
24
24
  };
25
25
  }
26
- exports.buildPostTargetTransformerFactory = buildPostTargetTransformerFactory;
27
26
  function processOptions(target, context) {
28
27
  const webpackConfigPath = target.options.webpackConfig;
29
28
  delete target.options.webpackConfig;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.servePostTargetTransformerFactory = void 0;
3
+ exports.servePostTargetTransformerFactory = servePostTargetTransformerFactory;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const plugin_migration_utils_1 = require("@nx/devkit/src/generators/plugin-migrations/plugin-migration-utils");
6
6
  const tsquery_1 = require("@phenomnomnominal/tsquery");
@@ -26,7 +26,6 @@ function servePostTargetTransformerFactory(migrationContext) {
26
26
  return target;
27
27
  };
28
28
  }
29
- exports.servePostTargetTransformerFactory = servePostTargetTransformerFactory;
30
29
  async function processOptions(tree, target, context) {
31
30
  const executorContext = {
32
31
  cwd: process.cwd(),
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.webpackInitGeneratorInternal = exports.webpackInitGenerator = void 0;
3
+ exports.webpackInitGenerator = webpackInitGenerator;
4
+ exports.webpackInitGeneratorInternal = webpackInitGeneratorInternal;
4
5
  const devkit_1 = require("@nx/devkit");
5
6
  const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
6
7
  const plugin_1 = require("../../plugins/plugin");
@@ -8,7 +9,6 @@ const versions_1 = require("../../utils/versions");
8
9
  function webpackInitGenerator(tree, schema) {
9
10
  return webpackInitGeneratorInternal(tree, { addPlugin: false, ...schema });
10
11
  }
11
- exports.webpackInitGenerator = webpackInitGenerator;
12
12
  async function webpackInitGeneratorInternal(tree, schema) {
13
13
  const nxJson = (0, devkit_1.readNxJson)(tree);
14
14
  const addPluginDefault = process.env.NX_ADD_PLUGINS !== 'false' &&
@@ -55,5 +55,4 @@ async function webpackInitGeneratorInternal(tree, schema) {
55
55
  }
56
56
  return installTask;
57
57
  }
58
- exports.webpackInitGeneratorInternal = webpackInitGeneratorInternal;
59
58
  exports.default = webpackInitGenerator;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = replacePackage;
3
4
  const devkit_1 = require("@nx/devkit");
4
5
  const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
5
6
  async function replacePackage(tree) {
6
7
  await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/webpack', '@nx/webpack');
7
8
  await (0, devkit_1.formatFiles)(tree);
8
9
  }
9
- exports.default = replacePackage;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const devkit_1 = require("@nx/devkit");
4
5
  const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
5
6
  async function default_1(tree) {
@@ -28,4 +29,3 @@ async function default_1(tree) {
28
29
  (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/webpack:webpack', update);
29
30
  await (0, devkit_1.formatFiles)(tree);
30
31
  }
31
- exports.default = default_1;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyBaseConfig = void 0;
3
+ exports.applyBaseConfig = applyBaseConfig;
4
4
  const path = require("path");
5
5
  const license_webpack_plugin_1 = require("license-webpack-plugin");
6
6
  const CopyWebpackPlugin = require("copy-webpack-plugin");
@@ -34,7 +34,6 @@ function applyBaseConfig(options, config = {}, { useNormalizedEntry, } = {}) {
34
34
  return;
35
35
  applyNxDependentConfig(options, config, { useNormalizedEntry });
36
36
  }
37
- exports.applyBaseConfig = applyBaseConfig;
38
37
  function applyNxIndependentConfig(options, config) {
39
38
  const hashFormat = (0, hash_format_1.getOutputHashFormat)(options.outputHashing);
40
39
  config.context = path.join(options.root, options.projectRoot);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyWebConfig = void 0;
3
+ exports.applyWebConfig = applyWebConfig;
4
4
  const path = require("path");
5
5
  const webpack_subresource_integrity_1 = require("webpack-subresource-integrity");
6
6
  const webpack_1 = require("webpack");
@@ -369,4 +369,3 @@ function applyWebConfig(options, config = {}, { useNormalizedEntry, } = {}) {
369
369
  config.plugins ??= [];
370
370
  config.plugins.push(...plugins);
371
371
  }
372
- exports.applyWebConfig = applyWebConfig;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createLoaderFromCompiler = void 0;
3
+ exports.createLoaderFromCompiler = createLoaderFromCompiler;
4
4
  const path = require("path");
5
5
  const js_1 = require("@nx/js");
6
6
  function createLoaderFromCompiler(options) {
@@ -79,4 +79,3 @@ function createLoaderFromCompiler(options) {
79
79
  return null;
80
80
  }
81
81
  }
82
- exports.createLoaderFromCompiler = createLoaderFromCompiler;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTerserEcmaVersion = void 0;
3
+ exports.getTerserEcmaVersion = getTerserEcmaVersion;
4
4
  const path = require("path");
5
5
  const fs = require("fs");
6
6
  const browserslist = require("browserslist");
@@ -32,4 +32,3 @@ function getTerserEcmaVersion(projectRoot) {
32
32
  const browsers = browserslist(env);
33
33
  return browsers.some((b) => ES5_BROWSERS.includes(b)) ? 5 : 2020;
34
34
  }
35
- exports.getTerserEcmaVersion = getTerserEcmaVersion;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.instantiateScriptPlugins = void 0;
3
+ exports.instantiateScriptPlugins = instantiateScriptPlugins;
4
4
  const path = require("path");
5
5
  const hash_format_1 = require("../../../utils/hash-format");
6
6
  const scripts_webpack_plugin_1 = require("../../../utils/webpack/plugins/scripts-webpack-plugin");
@@ -39,4 +39,3 @@ function instantiateScriptPlugins(options) {
39
39
  });
40
40
  return plugins;
41
41
  }
42
- exports.instantiateScriptPlugins = instantiateScriptPlugins;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizeFileReplacements = exports.normalizeAssets = exports.normalizeOptions = void 0;
3
+ exports.normalizeOptions = normalizeOptions;
4
+ exports.normalizeAssets = normalizeAssets;
5
+ exports.normalizeFileReplacements = normalizeFileReplacements;
4
6
  const path_1 = require("path");
5
7
  const fs_1 = require("fs");
6
8
  const devkit_1 = require("@nx/devkit");
@@ -85,7 +87,6 @@ function normalizeOptions(options) {
85
87
  vendorChunk: combinedPluginAndMaybeExecutorOptions.vendorChunk ?? !isProd,
86
88
  };
87
89
  }
88
- exports.normalizeOptions = normalizeOptions;
89
90
  function normalizeAssets(assets, root, sourceRoot, projectRoot, resolveRelativePathsToProjectRoot = true) {
90
91
  return assets.map((asset) => {
91
92
  if (typeof asset === 'string') {
@@ -126,7 +127,6 @@ function normalizeAssets(assets, root, sourceRoot, projectRoot, resolveRelativeP
126
127
  }
127
128
  });
128
129
  }
129
- exports.normalizeAssets = normalizeAssets;
130
130
  function normalizeFileReplacements(root, fileReplacements) {
131
131
  return fileReplacements
132
132
  ? fileReplacements.map((fileReplacement) => ({
@@ -135,7 +135,6 @@ function normalizeFileReplacements(root, fileReplacements) {
135
135
  }))
136
136
  : [];
137
137
  }
138
- exports.normalizeFileReplacements = normalizeFileReplacements;
139
138
  function normalizeRelativePaths(projectRoot, options) {
140
139
  for (const [fieldName, fieldValue] of Object.entries(options)) {
141
140
  if (isRelativePath(fieldValue)) {
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCommonLoadersForGlobalStyle = exports.getCommonLoadersForGlobalCss = exports.getCommonLoadersForCssModules = void 0;
3
+ exports.getCommonLoadersForCssModules = getCommonLoadersForCssModules;
4
+ exports.getCommonLoadersForGlobalCss = getCommonLoadersForGlobalCss;
5
+ exports.getCommonLoadersForGlobalStyle = getCommonLoadersForGlobalStyle;
4
6
  const path = require("path");
5
7
  const autoprefixer = require("autoprefixer");
6
8
  const postcssImports = require("postcss-import");
@@ -38,7 +40,6 @@ function getCommonLoadersForCssModules(options, includePaths) {
38
40
  },
39
41
  ];
40
42
  }
41
- exports.getCommonLoadersForCssModules = getCommonLoadersForCssModules;
42
43
  function getCommonLoadersForGlobalCss(options, includePaths) {
43
44
  return [
44
45
  {
@@ -58,7 +59,6 @@ function getCommonLoadersForGlobalCss(options, includePaths) {
58
59
  },
59
60
  ];
60
61
  }
61
- exports.getCommonLoadersForGlobalCss = getCommonLoadersForGlobalCss;
62
62
  function getCommonLoadersForGlobalStyle(options, includePaths) {
63
63
  return [
64
64
  {
@@ -79,7 +79,6 @@ function getCommonLoadersForGlobalStyle(options, includePaths) {
79
79
  },
80
80
  ];
81
81
  }
82
- exports.getCommonLoadersForGlobalStyle = getCommonLoadersForGlobalStyle;
83
82
  function postcssOptionsCreator(options, { includePaths, forCssModules = false, }) {
84
83
  const hashFormat = (0, hash_format_1.getOutputHashFormat)(options.outputHashing);
85
84
  // PostCSS options depend on the webpack loader, but we need to set the `config` path as a string due to this check:
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useLegacyNxPlugin = void 0;
3
+ exports.useLegacyNxPlugin = useLegacyNxPlugin;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const normalize_options_1 = require("../nx-webpack-plugin/lib/normalize-options");
6
6
  /**
@@ -56,4 +56,3 @@ async function useLegacyNxPlugin(fn, executorOptions) {
56
56
  return await fn(config, ctx);
57
57
  };
58
58
  }
59
- exports.useLegacyNxPlugin = useLegacyNxPlugin;
@@ -13,7 +13,14 @@ class WebpackNxBuildCoordinationPlugin {
13
13
  if (!skipInitialBuild) {
14
14
  this.buildChangedProjects();
15
15
  }
16
- this.startWatchingBuildableLibs();
16
+ if ((0, client_1.isDaemonEnabled)()) {
17
+ this.startWatchingBuildableLibs();
18
+ }
19
+ else {
20
+ output_1.output.warn({
21
+ title: 'Nx Daemon is not enabled. Buildable libs will not be rebuilt on file changes.',
22
+ });
23
+ }
17
24
  }
18
25
  apply(compiler) {
19
26
  compiler.hooks.beforeCompile.tapPromise('IncrementalDevServerPlugin', async () => {
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.composePluginsSync = exports.composePlugins = exports.isNxWebpackComposablePlugin = exports.nxWebpackComposablePlugin = void 0;
3
+ exports.nxWebpackComposablePlugin = void 0;
4
+ exports.isNxWebpackComposablePlugin = isNxWebpackComposablePlugin;
5
+ exports.composePlugins = composePlugins;
6
+ exports.composePluginsSync = composePluginsSync;
4
7
  const devkit_1 = require("@nx/devkit");
5
8
  exports.nxWebpackComposablePlugin = 'nxWebpackComposablePlugin';
6
9
  function isNxWebpackComposablePlugin(a) {
7
10
  return a?.[exports.nxWebpackComposablePlugin] === true;
8
11
  }
9
- exports.isNxWebpackComposablePlugin = isNxWebpackComposablePlugin;
10
12
  function composePlugins(...plugins) {
11
13
  return Object.assign(async function combined(config, ctx) {
12
14
  // Webpack may be calling us as a standard config function.
@@ -27,7 +29,6 @@ function composePlugins(...plugins) {
27
29
  [exports.nxWebpackComposablePlugin]: true,
28
30
  });
29
31
  }
30
- exports.composePlugins = composePlugins;
31
32
  function composePluginsSync(...plugins) {
32
33
  return Object.assign(function combined(config, ctx) {
33
34
  for (const plugin of plugins) {
@@ -38,7 +39,6 @@ function composePluginsSync(...plugins) {
38
39
  [exports.nxWebpackComposablePlugin]: true,
39
40
  });
40
41
  }
41
- exports.composePluginsSync = composePluginsSync;
42
42
  function ensureNxWebpackExecutionContext(ctx) {
43
43
  const projectName = process.env.NX_TASK_TARGET_PROJECT;
44
44
  const targetName = process.env.NX_TASK_TARGET_TARGET;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createCopyPlugin = void 0;
3
+ exports.createCopyPlugin = createCopyPlugin;
4
4
  const CopyWebpackPlugin = require("copy-webpack-plugin");
5
5
  function createCopyPlugin(assets) {
6
6
  return new CopyWebpackPlugin({
@@ -23,4 +23,3 @@ function createCopyPlugin(assets) {
23
23
  }),
24
24
  });
25
25
  }
26
- exports.createCopyPlugin = createCopyPlugin;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ensureDependencies = void 0;
3
+ exports.ensureDependencies = ensureDependencies;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const add_swc_dependencies_1 = require("@nx/js/src/utils/swc/add-swc-dependencies");
6
6
  const versions_1 = require("./versions");
@@ -24,4 +24,3 @@ function ensureDependencies(tree, options) {
24
24
  tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies));
25
25
  return (0, devkit_1.runTasksInSerial)(...tasks);
26
26
  }
27
- exports.ensureDependencies = ensureDependencies;
package/src/utils/fs.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteOutputDir = exports.findAllNodeModules = exports.findUp = void 0;
3
+ exports.findUp = findUp;
4
+ exports.findAllNodeModules = findAllNodeModules;
5
+ exports.deleteOutputDir = deleteOutputDir;
4
6
  const path = require("path");
5
7
  const fs_1 = require("fs");
6
8
  const fileutils_1 = require("nx/src/utils/fileutils");
@@ -27,7 +29,6 @@ function findUp(names, from, stopOnNodeModules = false) {
27
29
  }
28
30
  return null;
29
31
  }
30
- exports.findUp = findUp;
31
32
  function findAllNodeModules(from, root) {
32
33
  const nodeModules = [];
33
34
  let current = from;
@@ -44,7 +45,6 @@ function findAllNodeModules(from, root) {
44
45
  }
45
46
  return nodeModules;
46
47
  }
47
- exports.findAllNodeModules = findAllNodeModules;
48
48
  /**
49
49
  * Delete an output directory, but error out if it's the root of the project.
50
50
  */
@@ -55,4 +55,3 @@ function deleteOutputDir(root, outputPath) {
55
55
  }
56
56
  (0, fs_1.rmSync)(resolvedOutputPath, { recursive: true, force: true });
57
57
  }
58
- exports.deleteOutputDir = deleteOutputDir;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getClientEnvironment = void 0;
3
+ exports.getClientEnvironment = getClientEnvironment;
4
4
  function getClientEnvironment(mode) {
5
5
  // Grab NODE_ENV and NX_PUBLIC_* environment variables and prepare them to be
6
6
  // injected into the application via DefinePlugin in webpack configuration.
@@ -26,4 +26,3 @@ function getClientEnvironment(mode) {
26
26
  };
27
27
  return { stringified };
28
28
  }
29
- exports.getClientEnvironment = getClientEnvironment;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCSSModuleLocalIdent = void 0;
3
+ exports.getCSSModuleLocalIdent = getCSSModuleLocalIdent;
4
4
  const path_1 = require("path");
5
5
  const loader_utils_1 = require("loader-utils");
6
6
  function getCSSModuleLocalIdent(ctx, localIdentName, localName, options) {
@@ -15,4 +15,3 @@ function getCSSModuleLocalIdent(ctx, localIdentName, localName, options) {
15
15
  // Remove the .module that appears in every classname when based on the file and replace all "." with "_".
16
16
  return className.replace('.module_', '_').replace(/\./g, '_');
17
17
  }
18
- exports.getCSSModuleLocalIdent = getCSSModuleLocalIdent;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasPlugin = void 0;
3
+ exports.hasPlugin = hasPlugin;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  function hasPlugin(tree) {
6
6
  const nxJson = (0, devkit_1.readNxJson)(tree);
@@ -8,4 +8,3 @@ function hasPlugin(tree) {
8
8
  ? p === '@nx/webpack/plugin'
9
9
  : p.plugin === '@nx/webpack/plugin');
10
10
  }
11
- exports.hasPlugin = hasPlugin;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getOutputHashFormat = void 0;
3
+ exports.getOutputHashFormat = getOutputHashFormat;
4
4
  function getOutputHashFormat(option, length = 20) {
5
5
  const hashFormats = {
6
6
  none: { chunk: '', extract: '', file: '', script: '' },
@@ -20,4 +20,3 @@ function getOutputHashFormat(option, length = 20) {
20
20
  };
21
21
  return hashFormats[option] || hashFormats['none'];
22
22
  }
23
- exports.getOutputHashFormat = getOutputHashFormat;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDependentPackagesForProject = void 0;
3
+ exports.getDependentPackagesForProject = getDependentPackagesForProject;
4
4
  const typescript_1 = require("./typescript");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  function getDependentPackagesForProject(projectGraph, name) {
@@ -10,7 +10,6 @@ function getDependentPackagesForProject(projectGraph, name) {
10
10
  npmPackages: [...npmPackages],
11
11
  };
12
12
  }
13
- exports.getDependentPackagesForProject = getDependentPackagesForProject;
14
13
  function collectDependencies(projectGraph, name, dependencies = {
15
14
  workspaceLibraries: new Map(),
16
15
  npmPackages: new Set(),
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getModuleFederationConfig = exports.getRemotes = void 0;
3
+ exports.getRemotes = getRemotes;
4
+ exports.getModuleFederationConfig = getModuleFederationConfig;
4
5
  const devkit_1 = require("@nx/devkit");
5
6
  const internal_1 = require("@nx/js/src/internal");
6
7
  const find_matching_projects_1 = require("nx/src/utils/find-matching-projects");
@@ -66,7 +67,6 @@ function getRemotes(devRemotes, skipRemotes, config, context, pathToManifestFile
66
67
  remotePorts,
67
68
  };
68
69
  }
69
- exports.getRemotes = getRemotes;
70
70
  function getModuleFederationConfig(tsconfigPath, workspaceRoot, projectRoot, pluginName = 'react') {
71
71
  const moduleFederationConfigPathJS = (0, path_1.join)(workspaceRoot, projectRoot, 'module-federation.config.js');
72
72
  const moduleFederationConfigPathTS = (0, path_1.join)(workspaceRoot, projectRoot, 'module-federation.config.ts');
@@ -89,4 +89,3 @@ function getModuleFederationConfig(tsconfigPath, workspaceRoot, projectRoot, plu
89
89
  throw new Error(`Could not load ${moduleFederationConfigPath}. Was this project generated with "@nx/${pluginName}:host"?\nSee: https://nx.dev/concepts/more-concepts/faster-builds-with-module-federation`);
90
90
  }
91
91
  }
92
- exports.getModuleFederationConfig = getModuleFederationConfig;
@@ -1,4 +1,5 @@
1
1
  import type { NormalModuleReplacementPlugin } from 'webpack';
2
+ import type { moduleFederationPlugin } from '@module-federation/sdk';
2
3
  export type ModuleFederationLibrary = {
3
4
  type: string;
4
5
  name: string;
@@ -33,6 +34,7 @@ export interface ModuleFederationConfig {
33
34
  shared?: SharedFunction;
34
35
  additionalShared?: AdditionalSharedConfig;
35
36
  }
37
+ export type NxModuleFederationConfigOverride = Omit<moduleFederationPlugin.ModuleFederationPluginOptions, 'exposes' | 'remotes' | 'name' | 'library' | 'shared' | 'filename' | 'remoteType'>;
36
38
  export type WorkspaceLibrarySecondaryEntryPoint = {
37
39
  name: string;
38
40
  path: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readRootPackageJson = void 0;
3
+ exports.readRootPackageJson = readRootPackageJson;
4
4
  const fs_1 = require("fs");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  function readRootPackageJson() {
@@ -10,4 +10,3 @@ function readRootPackageJson() {
10
10
  }
11
11
  return (0, devkit_1.readJsonFile)(pkgJsonPath);
12
12
  }
13
- exports.readRootPackageJson = readRootPackageJson;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mapRemotesForSSR = exports.mapRemotes = void 0;
3
+ exports.mapRemotes = mapRemotes;
4
+ exports.mapRemotesForSSR = mapRemotesForSSR;
4
5
  const path_1 = require("path");
5
6
  /**
6
7
  * Map remote names to a format that can be understood and used by Module
@@ -22,7 +23,6 @@ function mapRemotes(remotes, remoteEntryExt, determineRemoteUrl, isRemoteGlobal
22
23
  }
23
24
  return mappedRemotes;
24
25
  }
25
- exports.mapRemotes = mapRemotes;
26
26
  // Helper function to deal with remotes that are arrays
27
27
  function handleArrayRemote(remote, remoteEntryExt, isRemoteGlobal) {
28
28
  const [remoteName, remoteLocation] = remote;
@@ -77,4 +77,3 @@ function mapRemotesForSSR(remotes, remoteEntryExt, determineRemoteUrl) {
77
77
  }
78
78
  return mappedRemotes;
79
79
  }
80
- exports.mapRemotesForSSR = mapRemotesForSSR;
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.collectPackageSecondaryEntryPoints = exports.recursivelyCollectSecondaryEntryPointsFromDirectory = exports.getNonNodeModulesSubDirs = exports.collectWorkspaceLibrarySecondaryEntryPoints = void 0;
3
+ exports.collectWorkspaceLibrarySecondaryEntryPoints = collectWorkspaceLibrarySecondaryEntryPoints;
4
+ exports.getNonNodeModulesSubDirs = getNonNodeModulesSubDirs;
5
+ exports.recursivelyCollectSecondaryEntryPointsFromDirectory = recursivelyCollectSecondaryEntryPointsFromDirectory;
6
+ exports.collectPackageSecondaryEntryPoints = collectPackageSecondaryEntryPoints;
4
7
  const path_1 = require("path");
5
8
  const fs_1 = require("fs");
6
9
  const devkit_1 = require("@nx/devkit");
@@ -33,14 +36,12 @@ function collectWorkspaceLibrarySecondaryEntryPoints(library, tsconfigPathAliase
33
36
  }
34
37
  return secondaryEntryPoints;
35
38
  }
36
- exports.collectWorkspaceLibrarySecondaryEntryPoints = collectWorkspaceLibrarySecondaryEntryPoints;
37
39
  function getNonNodeModulesSubDirs(directory) {
38
40
  return (0, fs_1.readdirSync)(directory)
39
41
  .filter((file) => file !== 'node_modules')
40
42
  .map((file) => (0, path_1.join)(directory, file))
41
43
  .filter((file) => (0, fs_1.lstatSync)(file).isDirectory());
42
44
  }
43
- exports.getNonNodeModulesSubDirs = getNonNodeModulesSubDirs;
44
45
  function recursivelyCollectSecondaryEntryPointsFromDirectory(pkgName, pkgVersion, pkgRoot, mainEntryPointExports, directories, collectedPackages) {
45
46
  for (const directory of directories) {
46
47
  const packageJsonPath = (0, path_1.join)(directory, 'package.json');
@@ -75,7 +76,6 @@ function recursivelyCollectSecondaryEntryPointsFromDirectory(pkgName, pkgVersion
75
76
  recursivelyCollectSecondaryEntryPointsFromDirectory(pkgName, pkgVersion, pkgRoot, mainEntryPointExports, subDirs, collectedPackages);
76
77
  }
77
78
  }
78
- exports.recursivelyCollectSecondaryEntryPointsFromDirectory = recursivelyCollectSecondaryEntryPointsFromDirectory;
79
79
  function collectPackageSecondaryEntryPoints(pkgName, pkgVersion, collectedPackages) {
80
80
  let pathToPackage;
81
81
  let packageJsonPath;
@@ -100,4 +100,3 @@ function collectPackageSecondaryEntryPoints(pkgName, pkgVersion, collectedPackag
100
100
  const subDirs = getNonNodeModulesSubDirs(pathToPackage);
101
101
  recursivelyCollectSecondaryEntryPointsFromDirectory(pkgName, pkgVersion, pathToPackage, exports, subDirs, collectedPackages);
102
102
  }
103
- exports.collectPackageSecondaryEntryPoints = collectPackageSecondaryEntryPoints;
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyAdditionalShared = exports.applySharedFunction = exports.sharePackages = exports.getNpmPackageSharedConfig = exports.shareWorkspaceLibraries = void 0;
3
+ exports.shareWorkspaceLibraries = shareWorkspaceLibraries;
4
+ exports.getNpmPackageSharedConfig = getNpmPackageSharedConfig;
5
+ exports.sharePackages = sharePackages;
6
+ exports.applySharedFunction = applySharedFunction;
7
+ exports.applyAdditionalShared = applyAdditionalShared;
4
8
  const path_1 = require("path");
5
9
  const package_json_1 = require("./package-json");
6
10
  const typescript_1 = require("./typescript");
@@ -99,7 +103,6 @@ function shareWorkspaceLibraries(workspaceLibs, tsConfigPath = process.env.NX_TS
99
103
  }),
100
104
  };
101
105
  }
102
- exports.shareWorkspaceLibraries = shareWorkspaceLibraries;
103
106
  /**
104
107
  * Build the Module Federation Share Config for a specific package and the
105
108
  * specified version of that package.
@@ -115,7 +118,6 @@ function getNpmPackageSharedConfig(pkgName, version) {
115
118
  }
116
119
  return { singleton: true, strictVersion: true, requiredVersion: version };
117
120
  }
118
- exports.getNpmPackageSharedConfig = getNpmPackageSharedConfig;
119
121
  /**
120
122
  * Create a dictionary of packages and their Module Federation Shared Config
121
123
  * from an array of package names.
@@ -140,7 +142,6 @@ function sharePackages(packages) {
140
142
  return shared;
141
143
  }, {});
142
144
  }
143
- exports.sharePackages = sharePackages;
144
145
  /**
145
146
  * Apply a custom function provided by the user that will modify the Shared Config
146
147
  * of the dependencies for the Module Federation build.
@@ -164,7 +165,6 @@ function applySharedFunction(sharedConfig, sharedFn) {
164
165
  sharedConfig[libraryName] = mappedDependency;
165
166
  }
166
167
  }
167
- exports.applySharedFunction = applySharedFunction;
168
168
  /**
169
169
  * Add additional dependencies to the shared package that may not have been
170
170
  * discovered by the project graph.
@@ -193,7 +193,6 @@ function applyAdditionalShared(sharedConfig, additionalShared, projectGraph) {
193
193
  }
194
194
  }
195
195
  }
196
- exports.applyAdditionalShared = applyAdditionalShared;
197
196
  function addStringDependencyToSharedConfig(sharedConfig, dependency, projectGraph) {
198
197
  if (projectGraph.nodes[dependency]) {
199
198
  sharedConfig[dependency] = { requiredVersion: false };
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRootTsConfigPath = exports.readTsConfig = exports.readTsPathMappings = void 0;
3
+ exports.readTsPathMappings = readTsPathMappings;
4
+ exports.readTsConfig = readTsConfig;
5
+ exports.getRootTsConfigPath = getRootTsConfigPath;
4
6
  const fs_1 = require("fs");
5
7
  const path_1 = require("path");
6
8
  const devkit_1 = require("@nx/devkit");
@@ -22,7 +24,6 @@ function readTsPathMappings(tsConfigPath = process.env.NX_TSCONFIG_PATH ?? getRo
22
24
  });
23
25
  return tsPathMappings.get(tsConfigPath);
24
26
  }
25
- exports.readTsPathMappings = readTsPathMappings;
26
27
  function readTsConfiguration(tsConfigPath) {
27
28
  if (!(0, fs_1.existsSync)(tsConfigPath)) {
28
29
  throw new Error(`NX MF: TsConfig Path for workspace libraries does not exist! (${tsConfigPath}).`);
@@ -37,12 +38,10 @@ function readTsConfig(tsConfigPath) {
37
38
  const readResult = tsModule.readConfigFile(tsConfigPath, tsModule.sys.readFile);
38
39
  return tsModule.parseJsonConfigFileContent(readResult.config, tsModule.sys, (0, path_1.dirname)(tsConfigPath));
39
40
  }
40
- exports.readTsConfig = readTsConfig;
41
41
  function getRootTsConfigPath() {
42
42
  const tsConfigFileName = getRootTsConfigFileName();
43
43
  return tsConfigFileName ? (0, path_1.join)(devkit_1.workspaceRoot, tsConfigFileName) : null;
44
44
  }
45
- exports.getRootTsConfigPath = getRootTsConfigPath;
46
45
  function getRootTsConfigFileName() {
47
46
  for (const tsConfigName of ['tsconfig.base.json', 'tsconfig.json']) {
48
47
  const tsConfigPath = (0, path_1.join)(devkit_1.workspaceRoot, tsConfigName);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runWebpackDevServer = void 0;
3
+ exports.runWebpackDevServer = runWebpackDevServer;
4
4
  const rxjs_1 = require("rxjs");
5
5
  function runWebpackDevServer(config, webpack, WebpackDevServer) {
6
6
  return new rxjs_1.Observable((subscriber) => {
@@ -28,4 +28,3 @@ function runWebpackDevServer(config, webpack, WebpackDevServer) {
28
28
  }
29
29
  });
30
30
  }
31
- exports.runWebpackDevServer = runWebpackDevServer;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const devkit_1 = require("@nx/devkit");
4
5
  // @ts-ignore
5
6
  const stylusLoader = require("stylus-loader");
@@ -8,4 +9,3 @@ function default_1(source) {
8
9
  devkit_1.logger.warn(`Stylus is support is deprecated and will be removed in Nx 20. We recommend that you migrate to Sass by renaming \`.styl\` files to \`.scss\` and ensuring that the content is valid Sass.`);
9
10
  return stylusLoader.call(this, source);
10
11
  }
11
- exports.default = default_1;
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.interpolateEnvironmentVariablesToIndex = void 0;
3
+ exports.interpolateEnvironmentVariablesToIndex = interpolateEnvironmentVariablesToIndex;
4
4
  function interpolateEnvironmentVariablesToIndex(contents, deployUrl) {
5
5
  const environmentVariables = getClientEnvironment(deployUrl || '');
6
6
  return interpolateEnvironmentVariables(contents, environmentVariables);
7
7
  }
8
- exports.interpolateEnvironmentVariablesToIndex = interpolateEnvironmentVariablesToIndex;
9
8
  const NX_PREFIX = /^NX_PUBLIC_/i;
10
9
  function isNxEnvironmentKey(x) {
11
10
  return NX_PREFIX.test(x);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizeExtraEntryPoints = void 0;
3
+ exports.normalizeExtraEntryPoints = normalizeExtraEntryPoints;
4
4
  function normalizeExtraEntryPoints(extraEntryPoints, defaultBundleName) {
5
5
  return extraEntryPoints.map((entry) => {
6
6
  let normalizedEntry;
@@ -25,4 +25,3 @@ function normalizeExtraEntryPoints(extraEntryPoints, defaultBundleName) {
25
25
  return normalizedEntry;
26
26
  });
27
27
  }
28
- exports.normalizeExtraEntryPoints = normalizeExtraEntryPoints;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateEntryPoints = void 0;
3
+ exports.generateEntryPoints = generateEntryPoints;
4
4
  const normalize_entry_1 = require("./normalize-entry");
5
5
  function generateEntryPoints(appConfig) {
6
6
  // Add all styles/scripts, except lazy-loaded ones.
@@ -28,4 +28,3 @@ function generateEntryPoints(appConfig) {
28
28
  }
29
29
  return entryPoints;
30
30
  }
31
- exports.generateEntryPoints = generateEntryPoints;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PostcssCliResources = void 0;
3
+ exports.PostcssCliResources = PostcssCliResources;
4
4
  const loader_utils_1 = require("loader-utils");
5
5
  const path = require("path");
6
6
  const url = require("node:url");
@@ -162,4 +162,3 @@ function PostcssCliResources(options) {
162
162
  },
163
163
  };
164
164
  }
165
- exports.PostcssCliResources = PostcssCliResources;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readWebpackOptions = void 0;
3
+ exports.readWebpackOptions = readWebpackOptions;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const config_1 = require("../config");
6
6
  /**
@@ -38,4 +38,3 @@ async function readWebpackOptions(webpackConfig) {
38
38
  }
39
39
  return config;
40
40
  }
41
- exports.readWebpackOptions = readWebpackOptions;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveUserDefinedWebpackConfig = void 0;
3
+ exports.resolveUserDefinedWebpackConfig = resolveUserDefinedWebpackConfig;
4
4
  const internal_1 = require("@nx/js/src/internal");
5
5
  const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
6
6
  function resolveUserDefinedWebpackConfig(path, tsConfig,
@@ -35,4 +35,3 @@ reload = false) {
35
35
  : maybeCustomWebpackConfig;
36
36
  return customWebpackConfig;
37
37
  }
38
- exports.resolveUserDefinedWebpackConfig = resolveUserDefinedWebpackConfig;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withNx = void 0;
3
+ exports.withNx = withNx;
4
4
  const apply_base_config_1 = require("../plugins/nx-webpack-plugin/lib/apply-base-config");
5
5
  const normalize_options_1 = require("../plugins/nx-webpack-plugin/lib/normalize-options");
6
6
  const processed = new Set();
@@ -31,4 +31,3 @@ function withNx(pluginOptions = {}) {
31
31
  return config;
32
32
  };
33
33
  }
34
- exports.withNx = withNx;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withWeb = void 0;
3
+ exports.withWeb = withWeb;
4
4
  const apply_web_config_1 = require("../plugins/nx-webpack-plugin/lib/apply-web-config");
5
5
  const processed = new Set();
6
6
  /**
@@ -23,4 +23,3 @@ function withWeb(pluginOptions = {}) {
23
23
  return config;
24
24
  };
25
25
  }
26
- exports.withWeb = withWeb;