@nx/react 20.0.10 → 20.1.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 (68) hide show
  1. package/mf/dynamic-federation.d.ts +64 -0
  2. package/mf/dynamic-federation.js +64 -0
  3. package/package.json +6 -6
  4. package/src/generators/application/files/base-rspack/src/app/__fileName__.spec.tsx__tmpl__ +3 -3
  5. package/src/generators/application/files/base-rspack/src/main.tsx__tmpl__ +27 -6
  6. package/src/generators/application/files/base-rspack/tsconfig.app.json__tmpl__ +1 -1
  7. package/src/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +3 -3
  8. package/src/generators/application/files/base-vite/src/main.tsx__tmpl__ +31 -6
  9. package/src/generators/application/files/base-vite/tsconfig.app.json__tmpl__ +1 -1
  10. package/src/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +3 -3
  11. package/src/generators/application/files/base-webpack/src/main.tsx__tmpl__ +22 -2
  12. package/src/generators/application/files/base-webpack/tsconfig.app.json__tmpl__ +1 -1
  13. package/src/generators/application/files/base-webpack/webpack.config.js__tmpl__ +3 -3
  14. package/src/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +26 -16
  15. package/src/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +29 -20
  16. package/src/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +26 -16
  17. package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +31 -22
  18. package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +30 -21
  19. package/src/generators/application/files/style-tailwind/src/app/__fileName__.tsx__tmpl__ +30 -18
  20. package/src/generators/application/lib/create-application-files.js +2 -0
  21. package/src/generators/application/lib/get-app-tests.js +8 -9
  22. package/src/generators/component/files/__fileName__.tsx__tmpl__ +55 -56
  23. package/src/generators/component-story/files/jsx/__componentFileName__.stories.jsx__tmpl__ +5 -5
  24. package/src/generators/component-story/files/tsx/__componentFileName__.stories.tsx__tmpl__ +3 -4
  25. package/src/generators/host/files/common/src/app/__fileName__.js__tmpl__ +28 -21
  26. package/src/generators/host/files/common/src/main.js__tmpl__ +12 -9
  27. package/src/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +28 -28
  28. package/src/generators/host/files/common-ts/src/main.ts__tmpl__ +12 -9
  29. package/src/generators/host/files/rspack-common/src/app/__fileName__.jsx__tmpl__ +22 -13
  30. package/src/generators/host/files/rspack-common/src/main.jsx__tmpl__ +12 -9
  31. package/src/generators/host/files/rspack-module-federation/module-federation.config.js__tmpl__ +4 -4
  32. package/src/generators/host/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +3 -1
  33. package/src/generators/host/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +6 -4
  34. package/src/generators/host/files/rspack-module-federation-ssr/rspack.server.config.js__tmpl__ +1 -1
  35. package/src/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +6 -6
  36. package/src/generators/host/files/rspack-module-federation-ssr-ts/rspack.server.config.ts__tmpl__ +1 -1
  37. package/src/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +18 -18
  38. package/src/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +23 -21
  39. package/src/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
  40. package/src/generators/host/files/webpack-module-federation/module-federation.config.js__tmpl__ +4 -4
  41. package/src/generators/host/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +23 -21
  42. package/src/generators/host/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +6 -6
  43. package/src/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +1 -1
  44. package/src/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +6 -6
  45. package/src/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
  46. package/src/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +18 -18
  47. package/src/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +23 -21
  48. package/src/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
  49. package/src/generators/host/host.js +3 -1
  50. package/src/generators/host/lib/add-module-federation-files.js +1 -1
  51. package/src/generators/library/files/common/tsconfig.lib.json__tmpl__ +1 -1
  52. package/src/generators/library/files/vite/tsconfig.lib.json__tmpl__ +1 -1
  53. package/src/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__ +7 -7
  54. package/src/generators/remote/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +4 -4
  55. package/src/generators/remote/files/rspack-module-federation-ssr/rspack.server.config.js__tmpl__ +1 -1
  56. package/src/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +4 -4
  57. package/src/generators/remote/files/rspack-module-federation-ssr-ts/rspack.server.config.ts__tmpl__ +1 -1
  58. package/src/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +7 -7
  59. package/src/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
  60. package/src/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__ +7 -7
  61. package/src/generators/remote/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +4 -4
  62. package/src/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +1 -1
  63. package/src/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +4 -4
  64. package/src/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
  65. package/src/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +7 -7
  66. package/src/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
  67. package/src/utils/versions.d.ts +1 -1
  68. package/src/utils/versions.js +1 -1
@@ -23,7 +23,9 @@ const prodConfig = {
23
23
  * ]
24
24
  */
25
25
  remotes: [
26
- <% remotes.forEach(function(r) {%>['<%= r.fileName %>', 'http://localhost:<%= r.port %>/'],<% }); %>
26
+ <%_ remotes.forEach(function(r) { _%>
27
+ ['<%= r.fileName %>', 'http://localhost:<%= r.port %>/'],
28
+ <%_ }); _%>
27
29
  ],
28
30
  };
29
31
 
@@ -6,10 +6,12 @@
6
6
  const moduleFederationConfig = {
7
7
  name: '<%= projectName %>',
8
8
  remotes: [
9
- <% if (static) {
10
- remotes.forEach(function(r) { %> "<%= r.fileName %>", <% });
11
- }
12
- %>
9
+ <%_ if (static) {
10
+ remotes.forEach(function(r) { _%>
11
+ "<%= r.fileName %>",
12
+ <%_ });
13
+ }
14
+ _%>
13
15
  ],
14
16
  };
15
17
 
@@ -4,7 +4,7 @@ const {withModuleFederationForSSR} = require('@nx/rspack/module-federation');
4
4
  const baseConfig = require('./module-federation.config');
5
5
 
6
6
  const defaultConfig = {
7
- ...baseConfig
7
+ ...baseConfig
8
8
  };
9
9
 
10
10
  // Nx plugins for rspack to build config object from Nx options and context.
@@ -1,12 +1,12 @@
1
1
  import { ModuleFederationConfig } from '@nx/rspack/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
- name: '<%= projectName %>',
5
- remotes: [
6
- <% if (static) {
7
- remotes.forEach(function(r) { %> "<%= r.fileName %>", <% });
8
- }
9
- %>
4
+ name: '<%= projectName %>',
5
+ remotes: [
6
+ <%_ if (static) {
7
+ remotes.forEach(function(r) { _%>
8
+ "<%= r.fileName %>",
9
+ <%_ }); } _%>
10
10
  ],
11
11
  };
12
12
 
@@ -4,7 +4,7 @@ import {withModuleFederationForSSR} from '@nx/rspack/module-federation';
4
4
  import baseConfig from './module-federation.config';
5
5
 
6
6
  const defaultConfig = {
7
- ...baseConfig
7
+ ...baseConfig
8
8
  };
9
9
 
10
10
  // Nx plugins for rspack to build config object from Nx options and context.
@@ -1,24 +1,24 @@
1
1
  import { ModuleFederationConfig } from '@nx/rspack/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
- name: '<%= projectName %>',
5
- /**
6
- * To use a remote that does not exist in your current Nx Workspace
7
- * You can use the tuple-syntax to define your remote
8
- *
9
- * remotes: [['my-external-remote', 'https://nx-angular-remote.netlify.app']]
10
- *
11
- * You _may_ need to add a `remotes.d.ts` file to your `src/` folder declaring the external remote for tsc, with the
12
- * following content:
13
- *
14
- * declare module 'my-external-remote';
15
- *
16
- */
17
- remotes: [
18
- <% if (static) {
19
- remotes.forEach(function(r) { %> "<%= r.fileName %>", <% });
20
- }
21
- %>
4
+ name: '<%= projectName %>',
5
+ /**
6
+ * To use a remote that does not exist in your current Nx Workspace
7
+ * You can use the tuple-syntax to define your remote
8
+ *
9
+ * remotes: [['my-external-remote', 'https://nx-angular-remote.netlify.app']]
10
+ *
11
+ * You _may_ need to add a `remotes.d.ts` file to your `src/` folder declaring the external remote for tsc, with the
12
+ * following content:
13
+ *
14
+ * declare module 'my-external-remote';
15
+ *
16
+ */
17
+ remotes: [
18
+ <%_ if (static) {
19
+ remotes.forEach(function(r) { _%>
20
+ "<%= r.fileName %>",
21
+ <%_ }); } _%>
22
22
  ],
23
23
  };
24
24
 
@@ -4,27 +4,29 @@ import { withModuleFederation, ModuleFederationConfig } from '@nx/rspack/module-
4
4
  import baseConfig from './module-federation.config';
5
5
 
6
6
  const prodConfig: ModuleFederationConfig = {
7
- ...baseConfig,
8
- /*
9
- * Remote overrides for production.
10
- * Each entry is a pair of a unique name and the URL where it is deployed.
11
- *
12
- * e.g.
13
- * remotes: [
14
- * ['app1', 'http://app1.example.com'],
15
- * ['app2', 'http://app2.example.com'],
16
- * ]
17
- *
18
- * You can also use a full path to the remoteEntry.js file if desired.
19
- *
20
- * remotes: [
21
- * ['app1', 'http://example.com/path/to/app1/remoteEntry.js'],
22
- * ['app2', 'http://example.com/path/to/app2/remoteEntry.js'],
23
- * ]
24
- */
25
- remotes: [
26
- <% remotes.forEach(function(r) {%>['<%= r.fileName %>', 'http://localhost:<%= r.port %>/'],<% }); %>
27
- ],
7
+ ...baseConfig,
8
+ /*
9
+ * Remote overrides for production.
10
+ * Each entry is a pair of a unique name and the URL where it is deployed.
11
+ *
12
+ * e.g.
13
+ * remotes: [
14
+ * ['app1', 'http://app1.example.com'],
15
+ * ['app2', 'http://app2.example.com'],
16
+ * ]
17
+ *
18
+ * You can also use a full path to the remoteEntry.js file if desired.
19
+ *
20
+ * remotes: [
21
+ * ['app1', 'http://example.com/path/to/app1/remoteEntry.js'],
22
+ * ['app2', 'http://example.com/path/to/app2/remoteEntry.js'],
23
+ * ]
24
+ */
25
+ remotes: [
26
+ <%_ remotes.forEach(function(r) { _%>
27
+ ['<%= r.fileName %>', 'http://localhost:<%= r.port %>/'],
28
+ <%_ }); _%>
29
+ ],
28
30
  };
29
31
 
30
32
  // Nx plugins for rspack to build config object from Nx options and context.
@@ -4,7 +4,7 @@ import {withModuleFederation, ModuleFederationConfig} from '@nx/rspack/module-fe
4
4
  import baseConfig from './module-federation.config';
5
5
 
6
6
  const config: ModuleFederationConfig = {
7
- ...baseConfig,
7
+ ...baseConfig,
8
8
  };
9
9
 
10
10
  // Nx plugins for rspack to build config object from Nx options and context.
@@ -16,9 +16,9 @@ module.exports = {
16
16
  *
17
17
  */
18
18
  remotes: [
19
- <% if (static) {
20
- remotes.forEach(function(r) { %> "<%= r.fileName %>", <% });
21
- }
22
- %>
19
+ <%_ if (static) {
20
+ remotes.forEach(function(r) { _%>
21
+ "<%= r.fileName %>",
22
+ <%_ }); } _%>
23
23
  ],
24
24
  };
@@ -5,27 +5,29 @@ const { withModuleFederation } = require('@nx/react/module-federation');
5
5
  const baseConfig = require('./module-federation.config');
6
6
 
7
7
  const prodConfig = {
8
- ...baseConfig,
9
- /*
10
- * Remote overrides for production.
11
- * Each entry is a pair of a unique name and the URL where it is deployed.
12
- *
13
- * e.g.
14
- * remotes: [
15
- * ['app1', 'http://app1.example.com'],
16
- * ['app2', 'http://app2.example.com'],
17
- * ]
18
- *
19
- * You can also use a full path to the remoteEntry.js file if desired.
20
- *
21
- * remotes: [
22
- * ['app1', 'http://example.com/path/to/app1/remoteEntry.js'],
23
- * ['app2', 'http://example.com/path/to/app2/remoteEntry.js'],
24
- * ]
25
- */
26
- remotes: [
27
- <% remotes.forEach(function(r) {%>['<%= r.fileName %>', 'http://localhost:<%= r.port %>/'],<% }); %>
28
- ],
8
+ ...baseConfig,
9
+ /*
10
+ * Remote overrides for production.
11
+ * Each entry is a pair of a unique name and the URL where it is deployed.
12
+ *
13
+ * e.g.
14
+ * remotes: [
15
+ * ['app1', 'http://app1.example.com'],
16
+ * ['app2', 'http://app2.example.com'],
17
+ * ]
18
+ *
19
+ * You can also use a full path to the remoteEntry.js file if desired.
20
+ *
21
+ * remotes: [
22
+ * ['app1', 'http://example.com/path/to/app1/remoteEntry.js'],
23
+ * ['app2', 'http://example.com/path/to/app2/remoteEntry.js'],
24
+ * ]
25
+ */
26
+ remotes: [
27
+ <%_ remotes.forEach(function(r) { _%>
28
+ ['<%= r.fileName %>', 'http://localhost:<%= r.port %>/'],
29
+ <%_ }); _%>
30
+ ],
29
31
  };
30
32
 
31
33
  // Nx plugins for webpack to build config object from Nx options and context.
@@ -4,12 +4,12 @@
4
4
  * @type {import('@nx/webpack').ModuleFederationConfig}
5
5
  **/
6
6
  const moduleFederationConfig = {
7
- name: '<%= projectName %>',
8
- remotes: [
9
- <% if (static) {
10
- remotes.forEach(function(r) { %> "<%= r.fileName %>", <% });
11
- }
12
- %>
7
+ name: '<%= projectName %>',
8
+ remotes: [
9
+ <%_ if (static) {
10
+ remotes.forEach(function(r) { _%>
11
+ "<%= r.fileName %>",
12
+ <%_ }); } _%>
13
13
  ],
14
14
  };
15
15
 
@@ -5,7 +5,7 @@ const {withModuleFederationForSSR} = require('@nx/react/module-federation');
5
5
  const baseConfig = require('./module-federation.config');
6
6
 
7
7
  const defaultConfig = {
8
- ...baseConfig
8
+ ...baseConfig
9
9
  };
10
10
 
11
11
  // Nx plugins for webpack to build config object from Nx options and context.
@@ -1,12 +1,12 @@
1
1
  import { ModuleFederationConfig } from '@nx/webpack';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
- name: '<%= projectName %>',
5
- remotes: [
6
- <% if (static) {
7
- remotes.forEach(function(r) { %> "<%= r.fileName %>", <% });
8
- }
9
- %>
4
+ name: '<%= projectName %>',
5
+ remotes: [
6
+ <%_ if (static) {
7
+ remotes.forEach(function(r) { _%>
8
+ "<%= r.fileName %>",
9
+ <%_ }); } _%>
10
10
  ],
11
11
  };
12
12
 
@@ -5,7 +5,7 @@ import {withModuleFederationForSSR} from '@nx/react/module-federation';
5
5
  import baseConfig from './module-federation.config';
6
6
 
7
7
  const defaultConfig = {
8
- ...baseConfig
8
+ ...baseConfig
9
9
  };
10
10
 
11
11
  // Nx plugins for webpack to build config object from Nx options and context.
@@ -1,24 +1,24 @@
1
1
  import { ModuleFederationConfig } from '@nx/webpack';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
- name: '<%= projectName %>',
5
- /**
6
- * To use a remote that does not exist in your current Nx Workspace
7
- * You can use the tuple-syntax to define your remote
8
- *
9
- * remotes: [['my-external-remote', 'https://nx-angular-remote.netlify.app']]
10
- *
11
- * You _may_ need to add a `remotes.d.ts` file to your `src/` folder declaring the external remote for tsc, with the
12
- * following content:
13
- *
14
- * declare module 'my-external-remote';
15
- *
16
- */
17
- remotes: [
18
- <% if (static) {
19
- remotes.forEach(function(r) { %> "<%= r.fileName %>", <% });
20
- }
21
- %>
4
+ name: '<%= projectName %>',
5
+ /**
6
+ * To use a remote that does not exist in your current Nx Workspace
7
+ * You can use the tuple-syntax to define your remote
8
+ *
9
+ * remotes: [['my-external-remote', 'https://nx-angular-remote.netlify.app']]
10
+ *
11
+ * You _may_ need to add a `remotes.d.ts` file to your `src/` folder declaring the external remote for tsc, with the
12
+ * following content:
13
+ *
14
+ * declare module 'my-external-remote';
15
+ *
16
+ */
17
+ remotes: [
18
+ <%_ if (static) {
19
+ remotes.forEach(function(r) { _%>
20
+ "<%= r.fileName %>",
21
+ <%_ }); } _%>
22
22
  ],
23
23
  };
24
24
 
@@ -6,27 +6,29 @@ import { ModuleFederationConfig } from '@nx/webpack';
6
6
  import baseConfig from './module-federation.config';
7
7
 
8
8
  const prodConfig: ModuleFederationConfig = {
9
- ...baseConfig,
10
- /*
11
- * Remote overrides for production.
12
- * Each entry is a pair of a unique name and the URL where it is deployed.
13
- *
14
- * e.g.
15
- * remotes: [
16
- * ['app1', 'http://app1.example.com'],
17
- * ['app2', 'http://app2.example.com'],
18
- * ]
19
- *
20
- * You can also use a full path to the remoteEntry.js file if desired.
21
- *
22
- * remotes: [
23
- * ['app1', 'http://example.com/path/to/app1/remoteEntry.js'],
24
- * ['app2', 'http://example.com/path/to/app2/remoteEntry.js'],
25
- * ]
26
- */
27
- remotes: [
28
- <% remotes.forEach(function(r) {%>['<%= r.fileName %>', 'http://localhost:<%= r.port %>/'],<% }); %>
29
- ],
9
+ ...baseConfig,
10
+ /*
11
+ * Remote overrides for production.
12
+ * Each entry is a pair of a unique name and the URL where it is deployed.
13
+ *
14
+ * e.g.
15
+ * remotes: [
16
+ * ['app1', 'http://app1.example.com'],
17
+ * ['app2', 'http://app2.example.com'],
18
+ * ]
19
+ *
20
+ * You can also use a full path to the remoteEntry.js file if desired.
21
+ *
22
+ * remotes: [
23
+ * ['app1', 'http://example.com/path/to/app1/remoteEntry.js'],
24
+ * ['app2', 'http://example.com/path/to/app2/remoteEntry.js'],
25
+ * ]
26
+ */
27
+ remotes: [
28
+ <%_ remotes.forEach(function(r) { _%>
29
+ ['<%= r.fileName %>', 'http://localhost:<%= r.port %>/'],
30
+ <%_ }); _%>
31
+ ],
30
32
  };
31
33
 
32
34
  // Nx plugins for webpack to build config object from Nx options and context.
@@ -5,7 +5,7 @@ import {withModuleFederation} from '@nx/react/module-federation';
5
5
  import baseConfig from './module-federation.config';
6
6
 
7
7
  const config: ModuleFederationConfig = {
8
- ...baseConfig,
8
+ ...baseConfig,
9
9
  };
10
10
 
11
11
  // Nx plugins for webpack to build config object from Nx options and context.
@@ -104,7 +104,9 @@ async function hostGenerator(host, schema) {
104
104
  host.delete((0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.lint.json'));
105
105
  }
106
106
  (0, add_mf_env_to_inputs_1.addMfEnvToTargetDefaultInputs)(host);
107
- const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, {}, { '@module-federation/enhanced': versions_1.moduleFederationEnhancedVersion });
107
+ const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, { '@module-federation/enhanced': versions_1.moduleFederationEnhancedVersion }, {
108
+ '@nx/web': versions_1.nxVersion,
109
+ });
108
110
  tasks.push(installTask);
109
111
  if (!options.skipFormat) {
110
112
  await (0, devkit_1.formatFiles)(host);
@@ -59,7 +59,7 @@ function addModuleFederationFiles(host, options, defaultRemoteManifest) {
59
59
  if (!host.exists(pathToMFManifest)) {
60
60
  host.write(pathToMFManifest, `{
61
61
  ${defaultRemoteManifest
62
- .map(({ name, port }) => `"${name}": "http://localhost:${port}"`)
62
+ .map(({ name, port }) => `"${name}": "http://localhost:${port}/mf-manifest.json"`)
63
63
  .join(',\n')}
64
64
  }`);
65
65
  }
@@ -4,7 +4,7 @@
4
4
  "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
5
  "types": [
6
6
  "node",
7
- <% if (style === 'styled-jsx') { %>"@nx/react/typings/styled-jsx.d.ts",<% } %>
7
+ <%_ if (style === 'styled-jsx') { %>"@nx/react/typings/styled-jsx.d.ts",<% } _%>
8
8
  "@nx/react/typings/cssmodule.d.ts",
9
9
  "@nx/react/typings/image.d.ts"
10
10
  ]
@@ -4,7 +4,7 @@
4
4
  "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5
5
  "types": [
6
6
  "node",
7
- <% if (style === 'styled-jsx') { %>"@nx/react/typings/styled-jsx.d.ts",<% } %>
7
+ <%_ if (style === 'styled-jsx') { _%>"@nx/react/typings/styled-jsx.d.ts",<%_ } _%>
8
8
  "@nx/react/typings/cssmodule.d.ts",
9
9
  "@nx/react/typings/image.d.ts"
10
10
  ]
@@ -2,11 +2,11 @@
2
2
  * Nx requires a default export of the config to allow correct resolution of the module federation graph.
3
3
  **/
4
4
  module.exports = {
5
- name: '<%= projectName %>',
6
- <% if (dynamic) { %>
7
- library: { type: 'var', name: '<%= projectName %>'},
8
- <% } %>
9
- exposes: {
10
- './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
11
- },
5
+ name: '<%= projectName %>',
6
+ <%_ if (dynamic) { _%>
7
+ library: { type: 'var', name: '<%= projectName %>'},
8
+ <%_ } _%>
9
+ exposes: {
10
+ './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
11
+ },
12
12
  };
@@ -2,8 +2,8 @@
2
2
  * Nx requires a default export of the config to allow correct resolution of the module federation graph.
3
3
  **/
4
4
  module.exports = {
5
- name: '<%= projectName %>',
6
- exposes: {
7
- './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
8
- },
5
+ name: '<%= projectName %>',
6
+ exposes: {
7
+ './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
8
+ },
9
9
  };
@@ -4,7 +4,7 @@ const {withModuleFederationForSSR} = require('@nx/rspack/module-federation');
4
4
  const baseConfig = require("./module-federation.server.config");
5
5
 
6
6
  const defaultConfig = {
7
- ...baseConfig,
7
+ ...baseConfig,
8
8
  };
9
9
 
10
10
  // Nx plugins for rspack to build config object from Nx options and context.
@@ -1,10 +1,10 @@
1
1
  import {ModuleFederationConfig} from '@nx/rspack/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
- name: '<%= projectName %>',
5
- exposes: {
6
- './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
7
- },
4
+ name: '<%= projectName %>',
5
+ exposes: {
6
+ './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
7
+ },
8
8
  };
9
9
 
10
10
  /**
@@ -4,7 +4,7 @@ import {withModuleFederationForSSR} from '@nx/rspack/module-federation';
4
4
  import baseConfig from "./module-federation.server.config";
5
5
 
6
6
  const defaultConfig = {
7
- ...baseConfig,
7
+ ...baseConfig,
8
8
  };
9
9
 
10
10
  // Nx plugins for rspack to build config object from Nx options and context.
@@ -1,13 +1,13 @@
1
1
  import {ModuleFederationConfig} from '@nx/rspack/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
- name: '<%= projectName %>',
5
- <% if (dynamic) { %>
6
- library: { type: 'var', name: '<%= projectName %>'},
7
- <% } %>
8
- exposes: {
9
- './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
10
- },
4
+ name: '<%= projectName %>',
5
+ <%_ if (dynamic) { _%>
6
+ library: { type: 'var', name: '<%= projectName %>'},
7
+ <%_ } _%>
8
+ exposes: {
9
+ './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
10
+ },
11
11
  };
12
12
 
13
13
  /**
@@ -4,7 +4,7 @@ import {withModuleFederation} from '@nx/rspack/module-federation';
4
4
  import baseConfig from './module-federation.config';
5
5
 
6
6
  const config = {
7
- ...baseConfig,
7
+ ...baseConfig,
8
8
  };
9
9
 
10
10
  // Nx plugins for rspack to build config object from Nx options and context.
@@ -2,11 +2,11 @@
2
2
  * Nx requires a default export of the config to allow correct resolution of the module federation graph.
3
3
  **/
4
4
  module.exports = {
5
- name: '<%= projectName %>',
6
- <% if (dynamic) { %>
7
- library: { type: 'var', name: '<%= projectName %>'},
8
- <% } %>
9
- exposes: {
10
- './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
11
- },
5
+ name: '<%= projectName %>',
6
+ <%_ if (dynamic) { _%>
7
+ library: { type: 'var', name: '<%= projectName %>'},
8
+ <%_ } _%>
9
+ exposes: {
10
+ './Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
11
+ },
12
12
  };
@@ -2,8 +2,8 @@
2
2
  * Nx requires a default export of the config to allow correct resolution of the module federation graph.
3
3
  **/
4
4
  module.exports = {
5
- name: '<%= projectName %>',
6
- exposes: {
7
- './Module': '<%= appProjectRoot %>/src/remote-entry.<%= js ? 'js' : 'ts' %>',
8
- },
5
+ name: '<%= projectName %>',
6
+ exposes: {
7
+ './Module': '<%= appProjectRoot %>/src/remote-entry.<%= js ? 'js' : 'ts' %>',
8
+ },
9
9
  };
@@ -5,7 +5,7 @@ const {withModuleFederationForSSR} = require('@nx/react/module-federation');
5
5
  const baseConfig = require("./module-federation.server.config");
6
6
 
7
7
  const defaultConfig = {
8
- ...baseConfig,
8
+ ...baseConfig,
9
9
  };
10
10
 
11
11
  // Nx plugins for webpack to build config object from Nx options and context.
@@ -1,10 +1,10 @@
1
1
  import {ModuleFederationConfig} from '@nx/webpack';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
- name: '<%= projectName %>',
5
- exposes: {
6
- './Module': '<%= appProjectRoot %>/src/remote-entry.<%= js ? 'js' : 'ts' %>',
7
- },
4
+ name: '<%= projectName %>',
5
+ exposes: {
6
+ './Module': '<%= appProjectRoot %>/src/remote-entry.<%= js ? 'js' : 'ts' %>',
7
+ },
8
8
  };
9
9
 
10
10
  /**
@@ -5,7 +5,7 @@ import {withModuleFederationForSSR} from '@nx/react/module-federation';
5
5
  import baseConfig from "./module-federation.server.config";
6
6
 
7
7
  const defaultConfig = {
8
- ...baseConfig,
8
+ ...baseConfig,
9
9
  };
10
10
 
11
11
  // Nx plugins for webpack to build config object from Nx options and context.