@nx/react 22.7.0-beta.8 → 22.7.0-beta.9

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.
@@ -1,141 +1,141 @@
1
1
  {
2
- "version": 2,
3
- "continuous": true,
4
- "outputCapture": "direct-nodejs",
5
- "title": "Module Federation Dev Server",
6
- "description": "Serve a web application.",
7
- "cli": "nx",
8
- "type": "object",
9
- "properties": {
10
- "devRemotes": {
11
- "type": "array",
12
- "items": {
13
- "oneOf": [
14
- {
15
- "type": "string"
16
- },
17
- {
18
- "type": "object",
19
- "properties": {
20
- "remoteName": {
21
- "type": "string"
22
- },
23
- "configuration": {
2
+ "version": 2,
3
+ "continuous": true,
4
+ "outputCapture": "direct-nodejs",
5
+ "title": "Module Federation Dev Server",
6
+ "description": "Serve a web application.",
7
+ "cli": "nx",
8
+ "type": "object",
9
+ "properties": {
10
+ "devRemotes": {
11
+ "type": "array",
12
+ "items": {
13
+ "oneOf": [
14
+ {
15
+ "type": "string"
16
+ },
17
+ {
18
+ "type": "object",
19
+ "properties": {
20
+ "remoteName": {
21
+ "type": "string"
22
+ },
23
+ "configuration": {
24
+ "type": "string"
25
+ }
26
+ },
27
+ "required": ["remoteName"],
28
+ "additionalProperties": false
29
+ }
30
+ ]
31
+ },
32
+ "description": "List of Producer (remote) applications to run in development mode (i.e. using serve target).",
33
+ "x-priority": "important",
34
+ "alias": "devProducers"
35
+ },
36
+ "skipRemotes": {
37
+ "type": "array",
38
+ "items": {
24
39
  "type": "string"
25
- }
26
40
  },
27
- "required": ["remoteName"],
28
- "additionalProperties": false
29
- }
30
- ]
31
- },
32
- "description": "List of Producer (remote) applications to run in development mode (i.e. using serve target).",
33
- "x-priority": "important",
34
- "alias": "devProducers"
35
- },
36
- "skipRemotes": {
37
- "type": "array",
38
- "items": {
39
- "type": "string"
40
- },
41
- "description": "List of Producer (remote) applications to not automatically serve, either statically or in development mode. This will not remove the Producers (remotes) from the `module-federation.config` file, and therefore the application may still try to fetch these Producers (remotes).\nThis option is useful if you have other means for serving the Producer (remote) application(s).\n**NOTE:** Producers (remotes) that are not in the workspace will be skipped automatically.",
42
- "x-priority": "important",
43
- "alias": "skipProducers"
44
- },
45
- "buildTarget": {
46
- "type": "string",
47
- "description": "Target which builds the application.",
48
- "x-priority": "important"
49
- },
50
- "port": {
51
- "type": "number",
52
- "description": "Port to listen on.",
53
- "default": 4200,
54
- "x-priority": "important"
55
- },
56
- "host": {
57
- "type": "string",
58
- "description": "Host to listen on.",
59
- "default": "localhost"
60
- },
61
- "ssl": {
62
- "type": "boolean",
63
- "description": "Serve using `HTTPS`.",
64
- "default": false
65
- },
66
- "sslKey": {
67
- "type": "string",
68
- "description": "SSL key to use for serving `HTTPS`."
69
- },
70
- "sslCert": {
71
- "type": "string",
72
- "description": "SSL certificate to use for serving `HTTPS`."
73
- },
74
- "watch": {
75
- "type": "boolean",
76
- "description": "Watches for changes and rebuilds application.",
77
- "default": true
78
- },
79
- "liveReload": {
80
- "type": "boolean",
81
- "description": "Whether to reload the page on change, using live-reload.",
82
- "default": true
83
- },
84
- "hmr": {
85
- "type": "boolean",
86
- "description": "Enable hot module replacement.",
87
- "default": false
88
- },
89
- "publicHost": {
90
- "type": "string",
91
- "description": "Public URL where the application will be served."
92
- },
93
- "open": {
94
- "type": "boolean",
95
- "description": "Open the application in the browser.",
96
- "default": false,
97
- "x-priority": "important"
98
- },
99
- "allowedHosts": {
100
- "type": "string",
101
- "description": "This option allows you to whitelist services that are allowed to access the dev server."
102
- },
103
- "memoryLimit": {
104
- "type": "number",
105
- "description": "Memory limit for type checking service process in `MB`."
106
- },
107
- "maxWorkers": {
108
- "type": "number",
109
- "description": "Number of workers to use for type checking."
110
- },
111
- "baseHref": {
112
- "type": "string",
113
- "description": "Base url for the application being built."
114
- },
115
- "static": {
116
- "type": "boolean",
117
- "description": "Whether to use a static file server instead of the webpack-dev-server. This should be used for Producer (remote) applications that are also Consumer (host) applications."
118
- },
119
- "isInitialHost": {
120
- "type": "boolean",
121
- "description": "Whether the Consumer (host) that is running this executor is the first in the project tree to do so.",
122
- "default": true,
123
- "x-priority": "internal",
124
- "alias": "isInitialConsumer"
125
- },
126
- "parallel": {
127
- "type": "number",
128
- "description": "Max number of parallel processes for building static Producers (remotes)"
129
- },
130
- "staticRemotesPort": {
131
- "type": "number",
132
- "description": "The port at which to serve the file-server for the static Producers (remotes).",
133
- "alias": "staticProducersPort"
134
- },
135
- "pathToManifestFile": {
136
- "type": "string",
137
- "description": "Path to a Module Federation manifest file (e.g. `my/path/to/module-federation.manifest.json`) containing the dynamic Producer (remote) applications relative to the workspace root."
138
- }
139
- },
140
- "examplesFile": "../../../docs/module-federation-dev-server-examples.md"
41
+ "description": "List of Producer (remote) applications to not automatically serve, either statically or in development mode. This will not remove the Producers (remotes) from the `module-federation.config` file, and therefore the application may still try to fetch these Producers (remotes).\nThis option is useful if you have other means for serving the Producer (remote) application(s).\n**NOTE:** Producers (remotes) that are not in the workspace will be skipped automatically.",
42
+ "x-priority": "important",
43
+ "alias": "skipProducers"
44
+ },
45
+ "buildTarget": {
46
+ "type": "string",
47
+ "description": "Target which builds the application.",
48
+ "x-priority": "important"
49
+ },
50
+ "port": {
51
+ "type": "number",
52
+ "description": "Port to listen on.",
53
+ "default": 4200,
54
+ "x-priority": "important"
55
+ },
56
+ "host": {
57
+ "type": "string",
58
+ "description": "Host to listen on.",
59
+ "default": "localhost"
60
+ },
61
+ "ssl": {
62
+ "type": "boolean",
63
+ "description": "Serve using `HTTPS`.",
64
+ "default": false
65
+ },
66
+ "sslKey": {
67
+ "type": "string",
68
+ "description": "SSL key to use for serving `HTTPS`."
69
+ },
70
+ "sslCert": {
71
+ "type": "string",
72
+ "description": "SSL certificate to use for serving `HTTPS`."
73
+ },
74
+ "watch": {
75
+ "type": "boolean",
76
+ "description": "Watches for changes and rebuilds application.",
77
+ "default": true
78
+ },
79
+ "liveReload": {
80
+ "type": "boolean",
81
+ "description": "Whether to reload the page on change, using live-reload.",
82
+ "default": true
83
+ },
84
+ "hmr": {
85
+ "type": "boolean",
86
+ "description": "Enable hot module replacement.",
87
+ "default": false
88
+ },
89
+ "publicHost": {
90
+ "type": "string",
91
+ "description": "Public URL where the application will be served."
92
+ },
93
+ "open": {
94
+ "type": "boolean",
95
+ "description": "Open the application in the browser.",
96
+ "default": false,
97
+ "x-priority": "important"
98
+ },
99
+ "allowedHosts": {
100
+ "type": "string",
101
+ "description": "This option allows you to whitelist services that are allowed to access the dev server."
102
+ },
103
+ "memoryLimit": {
104
+ "type": "number",
105
+ "description": "Memory limit for type checking service process in `MB`."
106
+ },
107
+ "maxWorkers": {
108
+ "type": "number",
109
+ "description": "Number of workers to use for type checking."
110
+ },
111
+ "baseHref": {
112
+ "type": "string",
113
+ "description": "Base url for the application being built."
114
+ },
115
+ "static": {
116
+ "type": "boolean",
117
+ "description": "Whether to use a static file server instead of the webpack-dev-server. This should be used for Producer (remote) applications that are also Consumer (host) applications."
118
+ },
119
+ "isInitialHost": {
120
+ "type": "boolean",
121
+ "description": "Whether the Consumer (host) that is running this executor is the first in the project tree to do so.",
122
+ "default": true,
123
+ "x-priority": "internal",
124
+ "alias": "isInitialConsumer"
125
+ },
126
+ "parallel": {
127
+ "type": "number",
128
+ "description": "Max number of parallel processes for building static Producers (remotes)"
129
+ },
130
+ "staticRemotesPort": {
131
+ "type": "number",
132
+ "description": "The port at which to serve the file-server for the static Producers (remotes).",
133
+ "alias": "staticProducersPort"
134
+ },
135
+ "pathToManifestFile": {
136
+ "type": "string",
137
+ "description": "Path to a Module Federation manifest file (e.g. `my/path/to/module-federation.manifest.json`) containing the dynamic Producer (remote) applications relative to the workspace root."
138
+ }
139
+ },
140
+ "examplesFile": "../../../docs/module-federation-dev-server-examples.md"
141
141
  }
@@ -1,80 +1,80 @@
1
1
  {
2
- "version": 2,
3
- "continuous": true,
4
- "outputCapture": "direct-nodejs",
5
- "title": "Module Federation SSR Dev Server",
6
- "description": "Serve a SSR Consumer (host) application along with its known Producers (remotes).",
7
- "cli": "nx",
8
- "type": "object",
9
- "properties": {
10
- "browserTarget": {
11
- "type": "string",
12
- "description": "Target which builds the browser application.",
13
- "x-priority": "important"
2
+ "version": 2,
3
+ "continuous": true,
4
+ "outputCapture": "direct-nodejs",
5
+ "title": "Module Federation SSR Dev Server",
6
+ "description": "Serve a SSR Consumer (host) application along with its known Producers (remotes).",
7
+ "cli": "nx",
8
+ "type": "object",
9
+ "properties": {
10
+ "browserTarget": {
11
+ "type": "string",
12
+ "description": "Target which builds the browser application.",
13
+ "x-priority": "important"
14
+ },
15
+ "serverTarget": {
16
+ "type": "string",
17
+ "description": "Target which builds the server application.",
18
+ "x-priority": "important"
19
+ },
20
+ "port": {
21
+ "type": "number",
22
+ "description": "The port to be set on `process.env.PORT` for use in the server.",
23
+ "default": 4200,
24
+ "x-priority": "important"
25
+ },
26
+ "devRemotes": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "string"
30
+ },
31
+ "description": "List of Producer (remote) applications to run in development mode (i.e. using serve target).",
32
+ "x-priority": "important",
33
+ "alias": "devProducers"
34
+ },
35
+ "skipRemotes": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "string"
39
+ },
40
+ "description": "List of Producer (remote) applications to not automatically serve, either statically or in development mode.",
41
+ "x-priority": "important",
42
+ "alias": "skipProducers"
43
+ },
44
+ "host": {
45
+ "type": "string",
46
+ "description": "Host to listen on.",
47
+ "default": "localhost"
48
+ },
49
+ "staticRemotesPort": {
50
+ "type": "number",
51
+ "description": "The port at which to serve the file-server for the static Producers (remotes).",
52
+ "alias": "staticProducersPort"
53
+ },
54
+ "pathToManifestFile": {
55
+ "type": "string",
56
+ "description": "Path to a Module Federation manifest file (e.g. `my/path/to/module-federation.manifest.json`) containing the dynamic Producer (remote) applications relative to the workspace root."
57
+ },
58
+ "ssl": {
59
+ "type": "boolean",
60
+ "description": "Serve using HTTPS.",
61
+ "default": false
62
+ },
63
+ "sslKey": {
64
+ "type": "string",
65
+ "description": "SSL key to use for serving HTTPS."
66
+ },
67
+ "sslCert": {
68
+ "type": "string",
69
+ "description": "SSL certificate to use for serving HTTPS."
70
+ },
71
+ "isInitialHost": {
72
+ "type": "boolean",
73
+ "description": "Whether the Consumer (host) that is running this executor is the first in the project tree to do so.",
74
+ "default": true,
75
+ "x-priority": "internal",
76
+ "alias": "isInitialConsumer"
77
+ }
14
78
  },
15
- "serverTarget": {
16
- "type": "string",
17
- "description": "Target which builds the server application.",
18
- "x-priority": "important"
19
- },
20
- "port": {
21
- "type": "number",
22
- "description": "The port to be set on `process.env.PORT` for use in the server.",
23
- "default": 4200,
24
- "x-priority": "important"
25
- },
26
- "devRemotes": {
27
- "type": "array",
28
- "items": {
29
- "type": "string"
30
- },
31
- "description": "List of Producer (remote) applications to run in development mode (i.e. using serve target).",
32
- "x-priority": "important",
33
- "alias": "devProducers"
34
- },
35
- "skipRemotes": {
36
- "type": "array",
37
- "items": {
38
- "type": "string"
39
- },
40
- "description": "List of Producer (remote) applications to not automatically serve, either statically or in development mode.",
41
- "x-priority": "important",
42
- "alias": "skipProducers"
43
- },
44
- "host": {
45
- "type": "string",
46
- "description": "Host to listen on.",
47
- "default": "localhost"
48
- },
49
- "staticRemotesPort": {
50
- "type": "number",
51
- "description": "The port at which to serve the file-server for the static Producers (remotes).",
52
- "alias": "staticProducersPort"
53
- },
54
- "pathToManifestFile": {
55
- "type": "string",
56
- "description": "Path to a Module Federation manifest file (e.g. `my/path/to/module-federation.manifest.json`) containing the dynamic Producer (remote) applications relative to the workspace root."
57
- },
58
- "ssl": {
59
- "type": "boolean",
60
- "description": "Serve using HTTPS.",
61
- "default": false
62
- },
63
- "sslKey": {
64
- "type": "string",
65
- "description": "SSL key to use for serving HTTPS."
66
- },
67
- "sslCert": {
68
- "type": "string",
69
- "description": "SSL certificate to use for serving HTTPS."
70
- },
71
- "isInitialHost": {
72
- "type": "boolean",
73
- "description": "Whether the Consumer (host) that is running this executor is the first in the project tree to do so.",
74
- "default": true,
75
- "x-priority": "internal",
76
- "alias": "isInitialConsumer"
77
- }
78
- },
79
- "required": ["browserTarget", "serverTarget"]
79
+ "required": ["browserTarget", "serverTarget"]
80
80
  }
@@ -1,15 +1,15 @@
1
1
  {
2
- "version": 2,
3
- "continuous": true,
4
- "outputCapture": "direct-nodejs",
5
- "title": "Module Federation Static Dev Server",
6
- "description": "Serve a Consumer (host) application statically along with its Producers (remotes).",
7
- "cli": "nx",
8
- "type": "object",
9
- "properties": {
10
- "serveTarget": {
11
- "type": "string"
12
- }
13
- },
14
- "required": ["serveTarget"]
2
+ "version": 2,
3
+ "continuous": true,
4
+ "outputCapture": "direct-nodejs",
5
+ "title": "Module Federation Static Dev Server",
6
+ "description": "Serve a Consumer (host) application statically along with its Producers (remotes).",
7
+ "cli": "nx",
8
+ "type": "object",
9
+ "properties": {
10
+ "serveTarget": {
11
+ "type": "string"
12
+ }
13
+ },
14
+ "required": ["serveTarget"]
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-vite.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react/src/generators/application/lib/bundlers/add-vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAoC,MAAM,YAAY,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAExD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBAyDb;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBA0Cb"}
1
+ {"version":3,"file":"add-vite.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react/src/generators/application/lib/bundlers/add-vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAoC,MAAM,YAAY,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAExD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBA2Db;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBA0Cb"}
@@ -67,6 +67,8 @@ async function setupViteConfiguration(tree, options, tasks) {
67
67
  addPlugin: options.addPlugin,
68
68
  projectType: 'application',
69
69
  port: options.port,
70
+ // React Router does not yet support Vite 8, so force Vite 7.
71
+ ...(options.useReactRouter ? { useViteV7: true } : {}),
70
72
  });
71
73
  tasks.push(viteTask);
72
74
  createOrEditViteConfig(tree, {