@nx/angular 24.0.0-beta.2 → 24.0.0-beta.3

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 (187) hide show
  1. package/dist/executors.d.ts +0 -2
  2. package/dist/executors.js +0 -2
  3. package/dist/generators.d.ts +0 -4
  4. package/dist/generators.js +0 -4
  5. package/dist/src/generators/add-linting/add-linting.js +0 -2
  6. package/dist/src/generators/add-linting/schema.d.ts +0 -1
  7. package/dist/src/generators/application/application.js +1 -2
  8. package/dist/src/generators/application/lib/add-e2e.js +0 -6
  9. package/dist/src/generators/application/lib/add-linting.js +0 -1
  10. package/dist/src/generators/application/lib/add-unit-test-runner.js +0 -2
  11. package/dist/src/generators/application/lib/normalize-options.d.ts +1 -1
  12. package/dist/src/generators/application/lib/normalize-options.js +1 -8
  13. package/dist/src/generators/application/schema.d.ts +0 -1
  14. package/dist/src/generators/application/schema.json +1 -1
  15. package/dist/src/generators/convert-to-rspack/convert-to-rspack.js +3 -4
  16. package/dist/src/generators/convert-to-rspack/lib/get-custom-webpack-config.d.ts +1 -2
  17. package/dist/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +0 -63
  18. package/dist/src/generators/convert-to-rspack/lib/validate-no-module-federation.d.ts +2 -0
  19. package/dist/src/generators/convert-to-rspack/lib/validate-no-module-federation.js +32 -0
  20. package/dist/src/generators/cypress-component-configuration/cypress-component-configuration.js +3 -15
  21. package/dist/src/generators/init/init.js +1 -2
  22. package/dist/src/generators/init/schema.d.ts +0 -2
  23. package/dist/src/generators/library/schema.d.ts +0 -1
  24. package/dist/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.js +12 -1
  25. package/dist/src/generators/ng-add/migrators/projects/e2e.migrator.js +12 -16
  26. package/dist/src/generators/ng-add/utilities/workspace.js +1 -3
  27. package/dist/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +0 -2
  28. package/dist/src/generators/utils/add-jest.d.ts +0 -1
  29. package/dist/src/generators/utils/add-jest.js +0 -2
  30. package/dist/src/generators/utils/add-vitest.d.ts +0 -1
  31. package/dist/src/generators/utils/add-vitest.js +0 -1
  32. package/dist/src/generators/utils/testing.d.ts +0 -4
  33. package/dist/src/generators/utils/testing.js +0 -12
  34. package/dist/src/utils/backward-compatible-versions.js +0 -8
  35. package/dist/src/utils/versions.d.ts +0 -4
  36. package/dist/src/utils/versions.js +1 -5
  37. package/executors.json +0 -10
  38. package/generators.json +0 -35
  39. package/package.json +11 -20
  40. package/dist/.npmignore +0 -2
  41. package/dist/fesm2022/nx-angular-mf.mjs +0 -193
  42. package/dist/fesm2022/nx-angular-mf.mjs.map +0 -1
  43. package/dist/mf/package.json +0 -4
  44. package/dist/src/builders/utilities/module-federation.d.ts +0 -11
  45. package/dist/src/builders/utilities/module-federation.js +0 -109
  46. package/dist/src/executors/module-federation-dev-server/lib/index.d.ts +0 -2
  47. package/dist/src/executors/module-federation-dev-server/lib/index.js +0 -5
  48. package/dist/src/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -2
  49. package/dist/src/executors/module-federation-dev-server/lib/normalize-options.js +0 -22
  50. package/dist/src/executors/module-federation-dev-server/lib/start-dev-remotes.d.ts +0 -5
  51. package/dist/src/executors/module-federation-dev-server/lib/start-dev-remotes.js +0 -29
  52. package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -4
  53. package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +0 -111
  54. package/dist/src/executors/module-federation-dev-server/schema.d.ts +0 -38
  55. package/dist/src/executors/module-federation-dev-server/schema.json +0 -171
  56. package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -2
  57. package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -20
  58. package/dist/src/executors/module-federation-ssr-dev-server/lib/start-dev-remotes.d.ts +0 -5
  59. package/dist/src/executors/module-federation-ssr-dev-server/lib/start-dev-remotes.js +0 -30
  60. package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -4
  61. package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +0 -110
  62. package/dist/src/executors/module-federation-ssr-dev-server/schema.d.ts +0 -17
  63. package/dist/src/executors/module-federation-ssr-dev-server/schema.json +0 -124
  64. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts +0 -4
  65. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.js +0 -36
  66. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.d.ts +0 -5
  67. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.js +0 -448
  68. package/dist/src/generators/convert-to-with-mf/lib/check-name-matches.d.ts +0 -2
  69. package/dist/src/generators/convert-to-with-mf/lib/check-name-matches.js +0 -22
  70. package/dist/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.d.ts +0 -2
  71. package/dist/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +0 -45
  72. package/dist/src/generators/convert-to-with-mf/lib/get-webpack-config-path.d.ts +0 -2
  73. package/dist/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js +0 -18
  74. package/dist/src/generators/convert-to-with-mf/lib/index.d.ts +0 -6
  75. package/dist/src/generators/convert-to-with-mf/lib/index.js +0 -9
  76. package/dist/src/generators/convert-to-with-mf/lib/is-host-remote-config.d.ts +0 -5
  77. package/dist/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +0 -57
  78. package/dist/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.d.ts +0 -2
  79. package/dist/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +0 -13
  80. package/dist/src/generators/convert-to-with-mf/lib/write-new-webpack-config.d.ts +0 -3
  81. package/dist/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +0 -50
  82. package/dist/src/generators/convert-to-with-mf/schema.d.ts +0 -4
  83. package/dist/src/generators/convert-to-with-mf/schema.json +0 -33
  84. package/dist/src/generators/federate-module/federate-module.d.ts +0 -4
  85. package/dist/src/generators/federate-module/federate-module.js +0 -49
  86. package/dist/src/generators/federate-module/lib/add-file-to-remote-tsconfig.d.ts +0 -2
  87. package/dist/src/generators/federate-module/lib/add-file-to-remote-tsconfig.js +0 -14
  88. package/dist/src/generators/federate-module/lib/add-path-to-exposes.d.ts +0 -8
  89. package/dist/src/generators/federate-module/lib/add-path-to-exposes.js +0 -77
  90. package/dist/src/generators/federate-module/lib/add-path-to-ts-config.d.ts +0 -8
  91. package/dist/src/generators/federate-module/lib/add-path-to-ts-config.js +0 -11
  92. package/dist/src/generators/federate-module/lib/add-remote.d.ts +0 -7
  93. package/dist/src/generators/federate-module/lib/add-remote.js +0 -42
  94. package/dist/src/generators/federate-module/lib/check-remote-exists.d.ts +0 -2
  95. package/dist/src/generators/federate-module/lib/check-remote-exists.js +0 -21
  96. package/dist/src/generators/federate-module/lib/index.d.ts +0 -4
  97. package/dist/src/generators/federate-module/lib/index.js +0 -7
  98. package/dist/src/generators/federate-module/schema.d.ts +0 -13
  99. package/dist/src/generators/federate-module/schema.json +0 -83
  100. package/dist/src/generators/host/files/common/src/main.server.ts__tmpl__ +0 -78
  101. package/dist/src/generators/host/files/js/webpack.server.config.js__tmpl__ +0 -8
  102. package/dist/src/generators/host/files/ts/webpack.server.config.ts__tmpl__ +0 -9
  103. package/dist/src/generators/host/host.d.ts +0 -4
  104. package/dist/src/generators/host/host.js +0 -133
  105. package/dist/src/generators/host/lib/index.d.ts +0 -2
  106. package/dist/src/generators/host/lib/index.js +0 -5
  107. package/dist/src/generators/host/lib/update-ssr-setup.d.ts +0 -3
  108. package/dist/src/generators/host/lib/update-ssr-setup.js +0 -54
  109. package/dist/src/generators/host/lib/validate-options.d.ts +0 -3
  110. package/dist/src/generators/host/lib/validate-options.js +0 -12
  111. package/dist/src/generators/host/schema.d.ts +0 -36
  112. package/dist/src/generators/host/schema.json +0 -195
  113. package/dist/src/generators/remote/files/base/webpack.server.config.js__tmpl__ +0 -9
  114. package/dist/src/generators/remote/files/base-ts/webpack.server.config.ts__tmpl__ +0 -9
  115. package/dist/src/generators/remote/files/common/src/main.server.ts__tmpl__ +0 -84
  116. package/dist/src/generators/remote/files/standalone/src/bootstrap.server.ts__tmpl__ +0 -12
  117. package/dist/src/generators/remote/lib/find-next-available-port.d.ts +0 -2
  118. package/dist/src/generators/remote/lib/find-next-available-port.js +0 -16
  119. package/dist/src/generators/remote/lib/index.d.ts +0 -3
  120. package/dist/src/generators/remote/lib/index.js +0 -6
  121. package/dist/src/generators/remote/lib/update-ssr-setup.d.ts +0 -9
  122. package/dist/src/generators/remote/lib/update-ssr-setup.js +0 -82
  123. package/dist/src/generators/remote/lib/validate-options.d.ts +0 -3
  124. package/dist/src/generators/remote/lib/validate-options.js +0 -12
  125. package/dist/src/generators/remote/remote.d.ts +0 -4
  126. package/dist/src/generators/remote/remote.js +0 -114
  127. package/dist/src/generators/remote/schema.d.ts +0 -34
  128. package/dist/src/generators/remote/schema.json +0 -184
  129. package/dist/src/generators/setup-mf/files/entry-module-files/__entryModuleFileName__.ts__tmpl__ +0 -18
  130. package/dist/src/generators/setup-mf/files/entry-module-files/entry.routes.ts__tmpl__ +0 -4
  131. package/dist/src/generators/setup-mf/files/entry-module-files/entry__componentFileSuffix__.ts__tmpl__ +0 -10
  132. package/dist/src/generators/setup-mf/files/host-files/__appFileName__.spec.ts__tmpl__ +0 -42
  133. package/dist/src/generators/setup-mf/files/standalone-entry-component-files/entry.routes.ts__tmpl__ +0 -4
  134. package/dist/src/generators/setup-mf/files/standalone-entry-component-files/entry__componentFileSuffix__.ts__tmpl__ +0 -11
  135. package/dist/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +0 -27
  136. package/dist/src/generators/setup-mf/files/ts-webpack/tsconfig.lint.json__tmpl__ +0 -12
  137. package/dist/src/generators/setup-mf/files/ts-webpack/webpack.config.ts__tmpl__ +0 -9
  138. package/dist/src/generators/setup-mf/files/ts-webpack/webpack.prod.config.ts__tmpl__ +0 -21
  139. package/dist/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +0 -23
  140. package/dist/src/generators/setup-mf/files/webpack/webpack.config.js__tmpl__ +0 -9
  141. package/dist/src/generators/setup-mf/files/webpack/webpack.prod.config.js__tmpl__ +0 -21
  142. package/dist/src/generators/setup-mf/lib/add-cypress-workaround.d.ts +0 -3
  143. package/dist/src/generators/setup-mf/lib/add-cypress-workaround.js +0 -52
  144. package/dist/src/generators/setup-mf/lib/add-remote-entry.d.ts +0 -3
  145. package/dist/src/generators/setup-mf/lib/add-remote-entry.js +0 -27
  146. package/dist/src/generators/setup-mf/lib/add-remote-to-host.d.ts +0 -9
  147. package/dist/src/generators/setup-mf/lib/add-remote-to-host.js +0 -127
  148. package/dist/src/generators/setup-mf/lib/change-build-target.d.ts +0 -3
  149. package/dist/src/generators/setup-mf/lib/change-build-target.js +0 -24
  150. package/dist/src/generators/setup-mf/lib/fix-bootstrap.d.ts +0 -3
  151. package/dist/src/generators/setup-mf/lib/fix-bootstrap.js +0 -40
  152. package/dist/src/generators/setup-mf/lib/generate-config.d.ts +0 -6
  153. package/dist/src/generators/setup-mf/lib/generate-config.js +0 -32
  154. package/dist/src/generators/setup-mf/lib/get-remotes-with-ports.d.ts +0 -6
  155. package/dist/src/generators/setup-mf/lib/get-remotes-with-ports.js +0 -20
  156. package/dist/src/generators/setup-mf/lib/index.d.ts +0 -15
  157. package/dist/src/generators/setup-mf/lib/index.js +0 -18
  158. package/dist/src/generators/setup-mf/lib/move-angular-plugin-to-dependencies.d.ts +0 -2
  159. package/dist/src/generators/setup-mf/lib/move-angular-plugin-to-dependencies.js +0 -15
  160. package/dist/src/generators/setup-mf/lib/normalize-options.d.ts +0 -3
  161. package/dist/src/generators/setup-mf/lib/normalize-options.js +0 -26
  162. package/dist/src/generators/setup-mf/lib/remove-dead-code-from-remote.d.ts +0 -3
  163. package/dist/src/generators/setup-mf/lib/remove-dead-code-from-remote.js +0 -61
  164. package/dist/src/generators/setup-mf/lib/setup-host-if-dynamic.d.ts +0 -3
  165. package/dist/src/generators/setup-mf/lib/setup-host-if-dynamic.js +0 -20
  166. package/dist/src/generators/setup-mf/lib/setup-serve-target.d.ts +0 -3
  167. package/dist/src/generators/setup-mf/lib/setup-serve-target.js +0 -39
  168. package/dist/src/generators/setup-mf/lib/setup-tspath-for-remote.d.ts +0 -3
  169. package/dist/src/generators/setup-mf/lib/setup-tspath-for-remote.js +0 -15
  170. package/dist/src/generators/setup-mf/lib/update-host-app-routes.d.ts +0 -3
  171. package/dist/src/generators/setup-mf/lib/update-host-app-routes.js +0 -39
  172. package/dist/src/generators/setup-mf/lib/update-tsconfig.d.ts +0 -3
  173. package/dist/src/generators/setup-mf/lib/update-tsconfig.js +0 -18
  174. package/dist/src/generators/setup-mf/schema.d.ts +0 -35
  175. package/dist/src/generators/setup-mf/schema.json +0 -99
  176. package/dist/src/generators/setup-mf/setup-mf.d.ts +0 -4
  177. package/dist/src/generators/setup-mf/setup-mf.js +0 -90
  178. package/dist/src/generators/utils/add-mf-env-to-inputs.d.ts +0 -2
  179. package/dist/src/generators/utils/add-mf-env-to-inputs.js +0 -36
  180. package/dist/src/generators/utils/assert-mf-utils.d.ts +0 -1
  181. package/dist/src/generators/utils/assert-mf-utils.js +0 -8
  182. package/dist/src/utils/get-mf-projects.d.ts +0 -4
  183. package/dist/src/utils/get-mf-projects.js +0 -31
  184. package/dist/src/utils/module-federation-deprecation.d.ts +0 -4
  185. package/dist/src/utils/module-federation-deprecation.js +0 -29
  186. package/dist/types/nx-angular-mf.d.ts +0 -72
  187. package/dist/types/nx-angular-mf.d.ts.map +0 -1
@@ -1,124 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "title": "Module Federation SSR Dev Server Target",
4
- "x-deprecated": "The `@nx/angular:module-federation-ssr-dev-server` executor is deprecated. Angular Module Federation in Nx is no longer supported; use `@angular-architects/native-federation`. Removed in Nx v24.",
5
- "continuous": true,
6
- "outputCapture": "direct-nodejs",
7
- "description": "The module-federation-ssr-dev-server executor is reserved exclusively for use with host SSR Module Federation applications. It allows the user to specify which remote applications should be served with the host.",
8
- "type": "object",
9
- "properties": {
10
- "browserTarget": {
11
- "type": "string",
12
- "description": "Browser target to build.",
13
- "pattern": ".+:.+(:.+)?"
14
- },
15
- "serverTarget": {
16
- "type": "string",
17
- "description": "Server target to build.",
18
- "pattern": ".+:.+(:.+)?"
19
- },
20
- "host": {
21
- "type": "string",
22
- "description": "Host to listen on.",
23
- "default": "localhost"
24
- },
25
- "port": {
26
- "type": "number",
27
- "default": 4200,
28
- "description": "Port to start the development server at. Default is 4200. Pass 0 to get a dynamically assigned port."
29
- },
30
- "publicHost": {
31
- "type": "string",
32
- "description": "The URL that the browser client should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
33
- },
34
- "open": {
35
- "type": "boolean",
36
- "description": "Opens the url in default browser.",
37
- "default": false,
38
- "alias": "o"
39
- },
40
- "progress": {
41
- "type": "boolean",
42
- "description": "Log progress to the console while building."
43
- },
44
- "inspect": {
45
- "type": "boolean",
46
- "description": "Launch the development server in inspector mode and listen on address and port '127.0.0.1:9229'.",
47
- "default": false
48
- },
49
- "ssl": {
50
- "type": "boolean",
51
- "description": "Serve using HTTPS.",
52
- "default": false
53
- },
54
- "sslKey": {
55
- "type": "string",
56
- "description": "SSL key to use for serving HTTPS."
57
- },
58
- "sslCert": {
59
- "type": "string",
60
- "description": "SSL certificate to use for serving HTTPS."
61
- },
62
- "proxyConfig": {
63
- "type": "string",
64
- "description": "Proxy configuration file."
65
- },
66
- "devRemotes": {
67
- "type": "array",
68
- "items": {
69
- "oneOf": [
70
- {
71
- "type": "string"
72
- },
73
- {
74
- "type": "object",
75
- "properties": {
76
- "remoteName": {
77
- "type": "string"
78
- },
79
- "configuration": {
80
- "type": "string"
81
- }
82
- },
83
- "required": ["remoteName"],
84
- "additionalProperties": false
85
- }
86
- ]
87
- },
88
- "description": "List of remote applications to run in development mode (i.e. using serve target).",
89
- "x-priority": "important"
90
- },
91
- "skipRemotes": {
92
- "type": "array",
93
- "items": {
94
- "type": "string"
95
- },
96
- "description": "List of remote applications to not automatically serve, either statically or in development mode."
97
- },
98
- "verbose": {
99
- "type": "boolean",
100
- "description": "Adds more details to output logging.",
101
- "default": false
102
- },
103
- "pathToManifestFile": {
104
- "type": "string",
105
- "description": "Path to a Module Federation manifest file (e.g. `my/path/to/module-federation.manifest.json`) containing the dynamic remote applications relative to the workspace root."
106
- },
107
- "isInitialHost": {
108
- "type": "boolean",
109
- "description": "Whether the host that is running this executor is the first in the project tree to do so.",
110
- "default": true,
111
- "x-priority": "internal"
112
- },
113
- "parallel": {
114
- "type": "number",
115
- "description": "Max number of parallel processes for building static remotes"
116
- },
117
- "staticRemotesPort": {
118
- "type": "number",
119
- "description": "The port at which to serve the file-server for the static remotes."
120
- }
121
- },
122
- "additionalProperties": false,
123
- "required": ["browserTarget", "serverTarget"]
124
- }
@@ -1,4 +0,0 @@
1
- import { Tree } from '@nx/devkit';
2
- import type { Schema } from './schema';
3
- export declare function convertToWithMF(tree: Tree, schema: Schema): Promise<import("@nx/devkit").GeneratorCallback>;
4
- export default convertToWithMF;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertToWithMF = convertToWithMF;
4
- const devkit_1 = require("@nx/devkit");
5
- const assert_supported_angular_version_1 = require("../../utils/assert-supported-angular-version");
6
- const get_mf_projects_1 = require("../../utils/get-mf-projects");
7
- const versions_1 = require("../../utils/versions");
8
- const lib_1 = require("./lib");
9
- async function convertToWithMF(tree, schema) {
10
- (0, assert_supported_angular_version_1.assertSupportedAngularVersion)(tree);
11
- const projects = new Set((0, get_mf_projects_1.getMFProjects)(tree, { legacy: true }));
12
- if (!projects.has(schema.project)) {
13
- throw new Error(`Could not find project "${schema.project}" with a Micro Frontend configuration in your workspace. Please check the name of the project you're wishing to convert exists.`);
14
- }
15
- const project = (0, devkit_1.readProjectConfiguration)(tree, schema.project);
16
- const pathToWebpackConfig = (0, lib_1.getWebpackConfigPath)(project, schema.project);
17
- const webpackAst = (0, lib_1.parseASTOfWebpackConfig)(tree, pathToWebpackConfig);
18
- if (!(0, lib_1.checkOutputNameMatchesProjectName)(webpackAst, schema.project)) {
19
- throw new Error(`Cannot automatically migrate "${schema.project}" to "withModuleFederation" micro frontend webpack config.
20
- "uniqueName" in webpack config (${pathToWebpackConfig}) does not match project name.`);
21
- }
22
- if (!(0, lib_1.checkSharedNpmPackagesMatchExpected)(webpackAst)) {
23
- throw new Error(`Cannot automatically migrate "${schema.project}" to "withModuleFederation" micro frontend webpack config.
24
- There are npm packages being shared with a custom configuration in webpack config (${pathToWebpackConfig}).`);
25
- }
26
- devkit_1.logger.warn(`This Micro Frontend configuration conversion will overwrite "${schema.project}"'s current webpack config. If you have anything custom that is not related to Micro Frontends, it will be lost. You should be able to see the changes in your version control system.`);
27
- const [updatedWebpackConfig, mfConfig] = (0, lib_1.writeNewWebpackConfig)(webpackAst, (0, lib_1.isHostRemoteConfig)(webpackAst), schema.project);
28
- tree.write(pathToWebpackConfig, updatedWebpackConfig);
29
- tree.write((0, devkit_1.joinPathFragments)(project.root, 'module-federation.config.js'), mfConfig);
30
- const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@nx/module-federation': versions_1.nxVersion });
31
- if (!schema.skipFormat) {
32
- await (0, devkit_1.formatFiles)(tree);
33
- }
34
- return installTask;
35
- }
36
- exports.default = convertToWithMF;
@@ -1,5 +0,0 @@
1
- export declare const STANDARD_HOST_MFE_CONFIG = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'host1',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n remotes: {\n remote1: 'http://localhost:4201/remoteEntry.mjs',\n },\n shared: share({\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n ...sharedMappings.getDescriptors(),\n }),\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};\n";
2
- export declare const STANDARD_REMOTE_MFE_CONFIG = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'remote1',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n name: 'remote1',\n filename: 'remoteEntry.js',\n exposes: {\n './Module': 'apps/remote1/src/app/remote-entry/entry.module.ts',\n },\n shared: share({\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n ...sharedMappings.getDescriptors(),\n }),\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};\n";
3
- export declare const OLD_OBJECT_SHARED_SYNTAX = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'remote1',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n name: 'remote1',\n filename: 'remoteEntry.js',\n exposes: {\n './Module': 'apps/remote1/src/app/remote-entry/entry.module.ts',\n },\n shared: {\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n },\n ...sharedMappings.getDescriptors(),\n },\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};";
4
- export declare const ERROR_NAME_DOESNT_MATCH = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'somethingelse',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n name: 'remote1',\n filename: 'remoteEntry.js',\n exposes: {\n './Module': 'apps/remote1/src/app/remote-entry/entry.module.ts',\n },\n shared: share({\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n ...sharedMappings.getDescriptors(),\n }),\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};\n";
5
- export declare const ERROR_SHARED_PACKAGES_DOESNT_MATCH = "const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');\nconst mf = require('@angular-architects/module-federation/webpack');\nconst path = require('path');\nconst share = mf.share;\n\n/**\n * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser\n * builder as it will generate a temporary tsconfig file which contains any required remappings of\n * shared libraries.\n * A remapping will occur when a library is buildable, as webpack needs to know the location of the\n * built files for the buildable library.\n * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains\n * the location of the generated temporary tsconfig file.\n */\nconst tsConfigPath =\n process.env.NX_TSCONFIG_PATH ??\n path.join(__dirname, '../../tsconfig.base.json');\n\nconst workspaceRootPath = path.join(__dirname, '../../');\nconst sharedMappings = new mf.SharedMappings();\nsharedMappings.register(\n tsConfigPath,\n [\n /* mapped paths to share */\n ],\n workspaceRootPath\n);\n\nmodule.exports = {\n output: {\n uniqueName: 'host1',\n publicPath: 'auto',\n },\n optimization: {\n runtimeChunk: false,\n },\n experiments: {\n outputModule: true,\n },\n resolve: {\n alias: {\n ...sharedMappings.getAliases(),\n },\n },\n plugins: [\n new ModuleFederationPlugin({\n remotes: {\n remote1: 'http://localhost:4201/remoteEntry.mjs',\n },\n shared: share({\n '@angular/core': {\n singleton: true,\n strictVersion: true,\n requiredVersion: '13.0.0',\n includeSecondaries: true,\n },\n '@angular/common': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/common/http': {\n singleton: true,\n strictVersion: false,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n '@angular/router': {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n rxjs: {\n singleton: true,\n strictVersion: true,\n requiredVersion: 'auto',\n includeSecondaries: true,\n },\n ...sharedMappings.getDescriptors(),\n }),\n library: {\n type: 'module',\n },\n }),\n sharedMappings.getPlugin(),\n ],\n};\n";
@@ -1,448 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ERROR_SHARED_PACKAGES_DOESNT_MATCH = exports.ERROR_NAME_DOESNT_MATCH = exports.OLD_OBJECT_SHARED_SYNTAX = exports.STANDARD_REMOTE_MFE_CONFIG = exports.STANDARD_HOST_MFE_CONFIG = void 0;
4
- exports.STANDARD_HOST_MFE_CONFIG = `const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
5
- const mf = require('@angular-architects/module-federation/webpack');
6
- const path = require('path');
7
- const share = mf.share;
8
-
9
- /**
10
- * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser
11
- * builder as it will generate a temporary tsconfig file which contains any required remappings of
12
- * shared libraries.
13
- * A remapping will occur when a library is buildable, as webpack needs to know the location of the
14
- * built files for the buildable library.
15
- * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains
16
- * the location of the generated temporary tsconfig file.
17
- */
18
- const tsConfigPath =
19
- process.env.NX_TSCONFIG_PATH ??
20
- path.join(__dirname, '../../tsconfig.base.json');
21
-
22
- const workspaceRootPath = path.join(__dirname, '../../');
23
- const sharedMappings = new mf.SharedMappings();
24
- sharedMappings.register(
25
- tsConfigPath,
26
- [
27
- /* mapped paths to share */
28
- ],
29
- workspaceRootPath
30
- );
31
-
32
- module.exports = {
33
- output: {
34
- uniqueName: 'host1',
35
- publicPath: 'auto',
36
- },
37
- optimization: {
38
- runtimeChunk: false,
39
- },
40
- experiments: {
41
- outputModule: true,
42
- },
43
- resolve: {
44
- alias: {
45
- ...sharedMappings.getAliases(),
46
- },
47
- },
48
- plugins: [
49
- new ModuleFederationPlugin({
50
- remotes: {
51
- remote1: 'http://localhost:4201/remoteEntry.mjs',
52
- },
53
- shared: share({
54
- '@angular/core': {
55
- singleton: true,
56
- strictVersion: true,
57
- requiredVersion: 'auto',
58
- includeSecondaries: true,
59
- },
60
- '@angular/common': {
61
- singleton: true,
62
- strictVersion: true,
63
- requiredVersion: 'auto',
64
- includeSecondaries: true,
65
- },
66
- '@angular/common/http': {
67
- singleton: true,
68
- strictVersion: true,
69
- requiredVersion: 'auto',
70
- includeSecondaries: true,
71
- },
72
- '@angular/router': {
73
- singleton: true,
74
- strictVersion: true,
75
- requiredVersion: 'auto',
76
- includeSecondaries: true,
77
- },
78
- rxjs: {
79
- singleton: true,
80
- strictVersion: true,
81
- requiredVersion: 'auto',
82
- includeSecondaries: true,
83
- },
84
- ...sharedMappings.getDescriptors(),
85
- }),
86
- library: {
87
- type: 'module',
88
- },
89
- }),
90
- sharedMappings.getPlugin(),
91
- ],
92
- };
93
- `;
94
- exports.STANDARD_REMOTE_MFE_CONFIG = `const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
95
- const mf = require('@angular-architects/module-federation/webpack');
96
- const path = require('path');
97
- const share = mf.share;
98
-
99
- /**
100
- * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser
101
- * builder as it will generate a temporary tsconfig file which contains any required remappings of
102
- * shared libraries.
103
- * A remapping will occur when a library is buildable, as webpack needs to know the location of the
104
- * built files for the buildable library.
105
- * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains
106
- * the location of the generated temporary tsconfig file.
107
- */
108
- const tsConfigPath =
109
- process.env.NX_TSCONFIG_PATH ??
110
- path.join(__dirname, '../../tsconfig.base.json');
111
-
112
- const workspaceRootPath = path.join(__dirname, '../../');
113
- const sharedMappings = new mf.SharedMappings();
114
- sharedMappings.register(
115
- tsConfigPath,
116
- [
117
- /* mapped paths to share */
118
- ],
119
- workspaceRootPath
120
- );
121
-
122
- module.exports = {
123
- output: {
124
- uniqueName: 'remote1',
125
- publicPath: 'auto',
126
- },
127
- optimization: {
128
- runtimeChunk: false,
129
- },
130
- experiments: {
131
- outputModule: true,
132
- },
133
- resolve: {
134
- alias: {
135
- ...sharedMappings.getAliases(),
136
- },
137
- },
138
- plugins: [
139
- new ModuleFederationPlugin({
140
- name: 'remote1',
141
- filename: 'remoteEntry.js',
142
- exposes: {
143
- './Module': 'apps/remote1/src/app/remote-entry/entry.module.ts',
144
- },
145
- shared: share({
146
- '@angular/core': {
147
- singleton: true,
148
- strictVersion: true,
149
- requiredVersion: 'auto',
150
- includeSecondaries: true,
151
- },
152
- '@angular/common': {
153
- singleton: true,
154
- strictVersion: true,
155
- requiredVersion: 'auto',
156
- includeSecondaries: true,
157
- },
158
- '@angular/common/http': {
159
- singleton: true,
160
- strictVersion: true,
161
- requiredVersion: 'auto',
162
- includeSecondaries: true,
163
- },
164
- '@angular/router': {
165
- singleton: true,
166
- strictVersion: true,
167
- requiredVersion: 'auto',
168
- includeSecondaries: true,
169
- },
170
- rxjs: {
171
- singleton: true,
172
- strictVersion: true,
173
- requiredVersion: 'auto',
174
- includeSecondaries: true,
175
- },
176
- ...sharedMappings.getDescriptors(),
177
- }),
178
- library: {
179
- type: 'module',
180
- },
181
- }),
182
- sharedMappings.getPlugin(),
183
- ],
184
- };
185
- `;
186
- exports.OLD_OBJECT_SHARED_SYNTAX = `const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
187
- const mf = require('@angular-architects/module-federation/webpack');
188
- const path = require('path');
189
- const share = mf.share;
190
-
191
- /**
192
- * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser
193
- * builder as it will generate a temporary tsconfig file which contains any required remappings of
194
- * shared libraries.
195
- * A remapping will occur when a library is buildable, as webpack needs to know the location of the
196
- * built files for the buildable library.
197
- * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains
198
- * the location of the generated temporary tsconfig file.
199
- */
200
- const tsConfigPath =
201
- process.env.NX_TSCONFIG_PATH ??
202
- path.join(__dirname, '../../tsconfig.base.json');
203
-
204
- const workspaceRootPath = path.join(__dirname, '../../');
205
- const sharedMappings = new mf.SharedMappings();
206
- sharedMappings.register(
207
- tsConfigPath,
208
- [
209
- /* mapped paths to share */
210
- ],
211
- workspaceRootPath
212
- );
213
-
214
- module.exports = {
215
- output: {
216
- uniqueName: 'remote1',
217
- publicPath: 'auto',
218
- },
219
- optimization: {
220
- runtimeChunk: false,
221
- },
222
- experiments: {
223
- outputModule: true,
224
- },
225
- resolve: {
226
- alias: {
227
- ...sharedMappings.getAliases(),
228
- },
229
- },
230
- plugins: [
231
- new ModuleFederationPlugin({
232
- name: 'remote1',
233
- filename: 'remoteEntry.js',
234
- exposes: {
235
- './Module': 'apps/remote1/src/app/remote-entry/entry.module.ts',
236
- },
237
- shared: {
238
- '@angular/core': {
239
- singleton: true,
240
- strictVersion: true,
241
- },
242
- '@angular/common': {
243
- singleton: true,
244
- strictVersion: true,
245
- },
246
- '@angular/common/http': {
247
- singleton: true,
248
- strictVersion: true,
249
- },
250
- '@angular/router': {
251
- singleton: true,
252
- strictVersion: true,
253
- },
254
- rxjs: {
255
- singleton: true,
256
- strictVersion: true,
257
- },
258
- ...sharedMappings.getDescriptors(),
259
- },
260
- library: {
261
- type: 'module',
262
- },
263
- }),
264
- sharedMappings.getPlugin(),
265
- ],
266
- };`;
267
- exports.ERROR_NAME_DOESNT_MATCH = `const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
268
- const mf = require('@angular-architects/module-federation/webpack');
269
- const path = require('path');
270
- const share = mf.share;
271
-
272
- /**
273
- * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser
274
- * builder as it will generate a temporary tsconfig file which contains any required remappings of
275
- * shared libraries.
276
- * A remapping will occur when a library is buildable, as webpack needs to know the location of the
277
- * built files for the buildable library.
278
- * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains
279
- * the location of the generated temporary tsconfig file.
280
- */
281
- const tsConfigPath =
282
- process.env.NX_TSCONFIG_PATH ??
283
- path.join(__dirname, '../../tsconfig.base.json');
284
-
285
- const workspaceRootPath = path.join(__dirname, '../../');
286
- const sharedMappings = new mf.SharedMappings();
287
- sharedMappings.register(
288
- tsConfigPath,
289
- [
290
- /* mapped paths to share */
291
- ],
292
- workspaceRootPath
293
- );
294
-
295
- module.exports = {
296
- output: {
297
- uniqueName: 'somethingelse',
298
- publicPath: 'auto',
299
- },
300
- optimization: {
301
- runtimeChunk: false,
302
- },
303
- experiments: {
304
- outputModule: true,
305
- },
306
- resolve: {
307
- alias: {
308
- ...sharedMappings.getAliases(),
309
- },
310
- },
311
- plugins: [
312
- new ModuleFederationPlugin({
313
- name: 'remote1',
314
- filename: 'remoteEntry.js',
315
- exposes: {
316
- './Module': 'apps/remote1/src/app/remote-entry/entry.module.ts',
317
- },
318
- shared: share({
319
- '@angular/core': {
320
- singleton: true,
321
- strictVersion: true,
322
- requiredVersion: 'auto',
323
- includeSecondaries: true,
324
- },
325
- '@angular/common': {
326
- singleton: true,
327
- strictVersion: true,
328
- requiredVersion: 'auto',
329
- includeSecondaries: true,
330
- },
331
- '@angular/common/http': {
332
- singleton: true,
333
- strictVersion: true,
334
- requiredVersion: 'auto',
335
- includeSecondaries: true,
336
- },
337
- '@angular/router': {
338
- singleton: true,
339
- strictVersion: true,
340
- requiredVersion: 'auto',
341
- includeSecondaries: true,
342
- },
343
- rxjs: {
344
- singleton: true,
345
- strictVersion: true,
346
- requiredVersion: 'auto',
347
- includeSecondaries: true,
348
- },
349
- ...sharedMappings.getDescriptors(),
350
- }),
351
- library: {
352
- type: 'module',
353
- },
354
- }),
355
- sharedMappings.getPlugin(),
356
- ],
357
- };
358
- `;
359
- exports.ERROR_SHARED_PACKAGES_DOESNT_MATCH = `const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
360
- const mf = require('@angular-architects/module-federation/webpack');
361
- const path = require('path');
362
- const share = mf.share;
363
-
364
- /**
365
- * We use the NX_TSCONFIG_PATH environment variable when using the @nx/angular:webpack-browser
366
- * builder as it will generate a temporary tsconfig file which contains any required remappings of
367
- * shared libraries.
368
- * A remapping will occur when a library is buildable, as webpack needs to know the location of the
369
- * built files for the buildable library.
370
- * This NX_TSCONFIG_PATH environment variable is set by the @nx/angular:webpack-browser and it contains
371
- * the location of the generated temporary tsconfig file.
372
- */
373
- const tsConfigPath =
374
- process.env.NX_TSCONFIG_PATH ??
375
- path.join(__dirname, '../../tsconfig.base.json');
376
-
377
- const workspaceRootPath = path.join(__dirname, '../../');
378
- const sharedMappings = new mf.SharedMappings();
379
- sharedMappings.register(
380
- tsConfigPath,
381
- [
382
- /* mapped paths to share */
383
- ],
384
- workspaceRootPath
385
- );
386
-
387
- module.exports = {
388
- output: {
389
- uniqueName: 'host1',
390
- publicPath: 'auto',
391
- },
392
- optimization: {
393
- runtimeChunk: false,
394
- },
395
- experiments: {
396
- outputModule: true,
397
- },
398
- resolve: {
399
- alias: {
400
- ...sharedMappings.getAliases(),
401
- },
402
- },
403
- plugins: [
404
- new ModuleFederationPlugin({
405
- remotes: {
406
- remote1: 'http://localhost:4201/remoteEntry.mjs',
407
- },
408
- shared: share({
409
- '@angular/core': {
410
- singleton: true,
411
- strictVersion: true,
412
- requiredVersion: '13.0.0',
413
- includeSecondaries: true,
414
- },
415
- '@angular/common': {
416
- singleton: true,
417
- strictVersion: true,
418
- requiredVersion: 'auto',
419
- includeSecondaries: true,
420
- },
421
- '@angular/common/http': {
422
- singleton: true,
423
- strictVersion: false,
424
- requiredVersion: 'auto',
425
- includeSecondaries: true,
426
- },
427
- '@angular/router': {
428
- singleton: true,
429
- strictVersion: true,
430
- requiredVersion: 'auto',
431
- includeSecondaries: true,
432
- },
433
- rxjs: {
434
- singleton: true,
435
- strictVersion: true,
436
- requiredVersion: 'auto',
437
- includeSecondaries: true,
438
- },
439
- ...sharedMappings.getDescriptors(),
440
- }),
441
- library: {
442
- type: 'module',
443
- },
444
- }),
445
- sharedMappings.getPlugin(),
446
- ],
447
- };
448
- `;
@@ -1,2 +0,0 @@
1
- import type { SourceFile } from 'typescript';
2
- export declare function checkOutputNameMatchesProjectName(sourceFile: SourceFile, projectName: string): boolean;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkOutputNameMatchesProjectName = checkOutputNameMatchesProjectName;
4
- const internal_1 = require("@nx/js/internal");
5
- function checkOutputNameMatchesProjectName(sourceFile, projectName) {
6
- (0, internal_1.ensureTypescript)();
7
- const { query } = require('@phenomnomnominal/tsquery');
8
- const OUTPUT_SELECTOR = 'PropertyAssignment:has(Identifier[name=output]) > ObjectLiteralExpression:has(PropertyAssignment:has(Identifier[name=uniqueName]))';
9
- const UNIQUENAME_SELECTOR = 'ObjectLiteralExpression > PropertyAssignment:has(Identifier[name=uniqueName]) > StringLiteral';
10
- const outputNodes = query(sourceFile, OUTPUT_SELECTOR);
11
- if (outputNodes.length === 0) {
12
- // If the output isnt set in the config, then we can still set the project name correctly
13
- return true;
14
- }
15
- const uniqueNameNodes = query(outputNodes[0], UNIQUENAME_SELECTOR);
16
- if (uniqueNameNodes.length === 0) {
17
- // If the uniqeName isnt set in the config, then we can still set the project name correctly
18
- return true;
19
- }
20
- const uniqueName = uniqueNameNodes[0].getText().replace(/'/g, '');
21
- return uniqueName === projectName;
22
- }
@@ -1,2 +0,0 @@
1
- import type { SourceFile } from 'typescript';
2
- export declare function checkSharedNpmPackagesMatchExpected(sourceFile: SourceFile): boolean;