@nx/react 20.0.7 → 20.1.0-beta.0
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.
- package/mf/dynamic-federation.d.ts +64 -0
- package/mf/dynamic-federation.js +64 -0
- package/package.json +6 -6
- package/src/generators/application/files/base-rspack/src/app/__fileName__.spec.tsx__tmpl__ +3 -3
- package/src/generators/application/files/base-rspack/src/main.tsx__tmpl__ +27 -6
- package/src/generators/application/files/base-rspack/tsconfig.app.json__tmpl__ +1 -1
- package/src/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +3 -3
- package/src/generators/application/files/base-vite/src/main.tsx__tmpl__ +31 -6
- package/src/generators/application/files/base-vite/tsconfig.app.json__tmpl__ +1 -1
- package/src/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +3 -3
- package/src/generators/application/files/base-webpack/src/main.tsx__tmpl__ +22 -2
- package/src/generators/application/files/base-webpack/tsconfig.app.json__tmpl__ +1 -1
- package/src/generators/application/files/base-webpack/webpack.config.js__tmpl__ +3 -3
- package/src/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +26 -16
- package/src/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +29 -20
- package/src/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +26 -16
- package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +31 -22
- package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +30 -21
- package/src/generators/application/files/style-tailwind/src/app/__fileName__.tsx__tmpl__ +30 -18
- package/src/generators/application/lib/create-application-files.js +2 -0
- package/src/generators/application/lib/get-app-tests.js +8 -9
- package/src/generators/component/files/__fileName__.tsx__tmpl__ +55 -56
- package/src/generators/component-story/files/jsx/__componentFileName__.stories.jsx__tmpl__ +5 -5
- package/src/generators/component-story/files/tsx/__componentFileName__.stories.tsx__tmpl__ +3 -4
- package/src/generators/host/files/common/src/app/__fileName__.js__tmpl__ +28 -21
- package/src/generators/host/files/common/src/main.js__tmpl__ +12 -9
- package/src/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +28 -28
- package/src/generators/host/files/common-ts/src/main.ts__tmpl__ +12 -9
- package/src/generators/host/files/rspack-common/src/app/__fileName__.jsx__tmpl__ +22 -13
- package/src/generators/host/files/rspack-common/src/main.jsx__tmpl__ +12 -9
- package/src/generators/host/files/rspack-module-federation/module-federation.config.js__tmpl__ +4 -4
- package/src/generators/host/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +3 -1
- package/src/generators/host/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +6 -4
- package/src/generators/host/files/rspack-module-federation-ssr/rspack.server.config.js__tmpl__ +1 -1
- package/src/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +6 -6
- package/src/generators/host/files/rspack-module-federation-ssr-ts/rspack.server.config.ts__tmpl__ +1 -1
- package/src/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +18 -18
- package/src/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +23 -21
- package/src/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
- package/src/generators/host/files/webpack-module-federation/module-federation.config.js__tmpl__ +4 -4
- package/src/generators/host/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +23 -21
- package/src/generators/host/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +6 -6
- package/src/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +1 -1
- package/src/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +6 -6
- package/src/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/src/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +18 -18
- package/src/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +23 -21
- package/src/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
- package/src/generators/host/host.js +3 -1
- package/src/generators/host/lib/add-module-federation-files.js +1 -1
- package/src/generators/library/files/common/tsconfig.lib.json__tmpl__ +1 -1
- package/src/generators/library/files/vite/tsconfig.lib.json__tmpl__ +1 -1
- package/src/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__ +7 -7
- package/src/generators/remote/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +4 -4
- package/src/generators/remote/files/rspack-module-federation-ssr/rspack.server.config.js__tmpl__ +1 -1
- package/src/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +4 -4
- package/src/generators/remote/files/rspack-module-federation-ssr-ts/rspack.server.config.ts__tmpl__ +1 -1
- package/src/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +7 -7
- package/src/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
- package/src/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__ +7 -7
- package/src/generators/remote/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +4 -4
- package/src/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +1 -1
- package/src/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +4 -4
- package/src/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
- package/src/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +7 -7
- package/src/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
@@ -23,7 +23,9 @@ const prodConfig = {
|
|
23
23
|
* ]
|
24
24
|
*/
|
25
25
|
remotes: [
|
26
|
-
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
<%_ if (static) {
|
10
|
+
remotes.forEach(function(r) { _%>
|
11
|
+
"<%= r.fileName %>",
|
12
|
+
<%_ });
|
13
|
+
}
|
14
|
+
_%>
|
13
15
|
],
|
14
16
|
};
|
15
17
|
|
package/src/generators/host/files/rspack-module-federation-ssr/rspack.server.config.js__tmpl__
CHANGED
@@ -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
|
-
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
|
package/src/generators/host/files/rspack-module-federation-ssr-ts/rspack.server.config.ts__tmpl__
CHANGED
@@ -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
|
-
|
7
|
+
...baseConfig
|
8
8
|
};
|
9
9
|
|
10
10
|
// Nx plugins for rspack to build config object from Nx options and context.
|
package/src/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
import { ModuleFederationConfig } from '@nx/rspack/module-federation';
|
2
2
|
|
3
3
|
const config: ModuleFederationConfig = {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
-
|
7
|
+
...baseConfig,
|
8
8
|
};
|
9
9
|
|
10
10
|
// Nx plugins for rspack to build config object from Nx options and context.
|
@@ -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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
|
package/src/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__
CHANGED
@@ -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
|
-
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
|
package/src/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__
CHANGED
@@ -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
|
-
|
8
|
+
...baseConfig
|
9
9
|
};
|
10
10
|
|
11
11
|
// Nx plugins for webpack to build config object from Nx options and context.
|
package/src/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
import { ModuleFederationConfig } from '@nx/webpack';
|
2
2
|
|
3
3
|
const config: ModuleFederationConfig = {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
|
package/src/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__
CHANGED
@@ -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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
-
|
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, {
|
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
|
]
|
package/src/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__
CHANGED
@@ -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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
name: '<%= projectName %>',
|
6
|
+
exposes: {
|
7
|
+
'./Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
|
8
|
+
},
|
9
9
|
};
|
package/src/generators/remote/files/rspack-module-federation-ssr/rspack.server.config.js__tmpl__
CHANGED
@@ -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
|
-
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
name: '<%= projectName %>',
|
5
|
+
exposes: {
|
6
|
+
'./Module': './src/remote-entry.<%= js ? 'js' : 'ts' %>',
|
7
|
+
},
|
8
8
|
};
|
9
9
|
|
10
10
|
/**
|
package/src/generators/remote/files/rspack-module-federation-ssr-ts/rspack.server.config.ts__tmpl__
CHANGED
@@ -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
|
-
|
7
|
+
...baseConfig,
|
8
8
|
};
|
9
9
|
|
10
10
|
// Nx plugins for rspack to build config object from Nx options and context.
|
package/src/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import {ModuleFederationConfig} from '@nx/rspack/module-federation';
|
2
2
|
|
3
3
|
const config: ModuleFederationConfig = {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
/**
|
package/src/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__
CHANGED
@@ -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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
name: '<%= projectName %>',
|
6
|
+
exposes: {
|
7
|
+
'./Module': '<%= appProjectRoot %>/src/remote-entry.<%= js ? 'js' : 'ts' %>',
|
8
|
+
},
|
9
9
|
};
|
package/src/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__
CHANGED
@@ -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
|
-
|
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
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
8
|
+
...baseConfig,
|
9
9
|
};
|
10
10
|
|
11
11
|
// Nx plugins for webpack to build config object from Nx options and context.
|