@nx/react 23.3.0-pr.36958.5270397 → 23.3.0-pr.37068.f95e11e
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/dist/src/plugins/router-plugin.js +15 -10
- package/package.json +17 -17
|
@@ -73,9 +73,9 @@ async function buildReactRouterTargets(configFilePath, projectRoot, options, con
|
|
|
73
73
|
const { buildDirectory, serverBuildPath } = await getBuildPaths(reactRouterConfig, isLibMode);
|
|
74
74
|
const targets = {};
|
|
75
75
|
targets[options.buildTargetName] = await getBuildTargetConfig(options.buildTargetName, projectRoot, buildDirectory, serverBuildPath, namedInputs, isUsingTsSolutionSetup);
|
|
76
|
-
targets[options.devTargetName] = await devTarget(projectRoot, isUsingTsSolutionSetup);
|
|
76
|
+
targets[options.devTargetName] = await devTarget(projectRoot, namedInputs, isUsingTsSolutionSetup);
|
|
77
77
|
if (serverBuildPath) {
|
|
78
|
-
targets[options.startTargetName] = await startTarget(projectRoot, serverBuildPath, options.buildTargetName, isUsingTsSolutionSetup);
|
|
78
|
+
targets[options.startTargetName] = await startTarget(projectRoot, serverBuildPath, options.buildTargetName, namedInputs, isUsingTsSolutionSetup);
|
|
79
79
|
}
|
|
80
80
|
targets[options.typecheckTargetName] = await typecheckTarget(projectRoot, options.typecheckTargetName, namedInputs, siblingFiles, isUsingTsSolutionSetup);
|
|
81
81
|
(0, internal_2.addBuildAndWatchDepsTargets)(context.workspaceRoot, projectRoot, targets, options, pmCommand);
|
|
@@ -99,12 +99,7 @@ async function getBuildTargetConfig(buildTargetName, projectRoot, buildDirectory
|
|
|
99
99
|
const buildTarget = {
|
|
100
100
|
cache: true,
|
|
101
101
|
dependsOn: [`^${buildTargetName}`],
|
|
102
|
-
inputs:
|
|
103
|
-
...('production' in namedInputs
|
|
104
|
-
? ['production', '^production']
|
|
105
|
-
: ['default', '^default']),
|
|
106
|
-
{ externalDependencies: ['@react-router/dev'] },
|
|
107
|
-
],
|
|
102
|
+
inputs: buildInputs(namedInputs),
|
|
108
103
|
outputs,
|
|
109
104
|
command: 'react-router build',
|
|
110
105
|
options: { cwd: projectRoot },
|
|
@@ -126,9 +121,18 @@ async function getBuildPaths(reactRouterConfig, isLibMode) {
|
|
|
126
121
|
}),
|
|
127
122
|
};
|
|
128
123
|
}
|
|
129
|
-
|
|
124
|
+
function buildInputs(namedInputs) {
|
|
125
|
+
return [
|
|
126
|
+
...('production' in namedInputs
|
|
127
|
+
? ['production', '^production']
|
|
128
|
+
: ['default', '^default']),
|
|
129
|
+
{ externalDependencies: ['@react-router/dev'] },
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
async function devTarget(projectRoot, namedInputs, isUsingTsSolutionSetup) {
|
|
130
133
|
const devTarget = {
|
|
131
134
|
continuous: true,
|
|
135
|
+
inputs: buildInputs(namedInputs),
|
|
132
136
|
command: 'react-router dev',
|
|
133
137
|
options: { cwd: projectRoot },
|
|
134
138
|
};
|
|
@@ -137,13 +141,14 @@ async function devTarget(projectRoot, isUsingTsSolutionSetup) {
|
|
|
137
141
|
}
|
|
138
142
|
return devTarget;
|
|
139
143
|
}
|
|
140
|
-
async function startTarget(projectRoot, serverBuildPath, buildTargetName, isUsingTsSolutionSetup) {
|
|
144
|
+
async function startTarget(projectRoot, serverBuildPath, buildTargetName, namedInputs, isUsingTsSolutionSetup) {
|
|
141
145
|
const serverPath = serverBuildPath === 'build/server'
|
|
142
146
|
? `${serverBuildPath}/index.js`
|
|
143
147
|
: serverBuildPath;
|
|
144
148
|
const startTarget = {
|
|
145
149
|
continuous: true,
|
|
146
150
|
dependsOn: [buildTargetName],
|
|
151
|
+
inputs: buildInputs(namedInputs),
|
|
147
152
|
command: `react-router-serve ${serverPath}`,
|
|
148
153
|
options: { cwd: projectRoot },
|
|
149
154
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "23.3.0-pr.
|
|
3
|
+
"version": "23.3.0-pr.37068.f95e11e",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"react-dom": ">=18.0.0 <20.0.0",
|
|
97
97
|
"express": "^4.21.2",
|
|
98
98
|
"http-proxy-middleware": "^3.0.7",
|
|
99
|
-
"@nx/module-federation": "23.3.0-pr.
|
|
99
|
+
"@nx/module-federation": "23.3.0-pr.37068.f95e11e"
|
|
100
100
|
},
|
|
101
101
|
"peerDependenciesMeta": {
|
|
102
102
|
"babel-plugin-react-compiler": {
|
|
@@ -118,27 +118,27 @@
|
|
|
118
118
|
"minimatch": "10.2.5",
|
|
119
119
|
"tslib": "^2.3.0",
|
|
120
120
|
"semver": "^7.6.3",
|
|
121
|
-
"@nx/devkit": "23.3.0-pr.
|
|
122
|
-
"@nx/js": "23.3.0-pr.
|
|
123
|
-
"@nx/eslint": "23.3.0-pr.
|
|
124
|
-
"@nx/web": "23.3.0-pr.
|
|
121
|
+
"@nx/devkit": "23.3.0-pr.37068.f95e11e",
|
|
122
|
+
"@nx/js": "23.3.0-pr.37068.f95e11e",
|
|
123
|
+
"@nx/eslint": "23.3.0-pr.37068.f95e11e",
|
|
124
|
+
"@nx/web": "23.3.0-pr.37068.f95e11e"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"express": "^4.21.2",
|
|
128
128
|
"http-proxy-middleware": "^3.0.7",
|
|
129
|
-
"@nx/cypress": "23.3.0-pr.
|
|
130
|
-
"@nx/module-federation": "23.3.0-pr.
|
|
131
|
-
"@nx/playwright": "23.3.0-pr.
|
|
132
|
-
"@nx/rollup": "23.3.0-pr.
|
|
133
|
-
"@nx/rsbuild": "23.3.0-pr.
|
|
134
|
-
"@nx/vite": "23.3.0-pr.
|
|
135
|
-
"@nx/vitest": "23.3.0-pr.
|
|
136
|
-
"@nx/webpack": "23.3.0-pr.
|
|
137
|
-
"@nx/storybook": "23.3.0-pr.
|
|
138
|
-
"nx": "23.3.0-pr.
|
|
129
|
+
"@nx/cypress": "23.3.0-pr.37068.f95e11e",
|
|
130
|
+
"@nx/module-federation": "23.3.0-pr.37068.f95e11e",
|
|
131
|
+
"@nx/playwright": "23.3.0-pr.37068.f95e11e",
|
|
132
|
+
"@nx/rollup": "23.3.0-pr.37068.f95e11e",
|
|
133
|
+
"@nx/rsbuild": "23.3.0-pr.37068.f95e11e",
|
|
134
|
+
"@nx/vite": "23.3.0-pr.37068.f95e11e",
|
|
135
|
+
"@nx/vitest": "23.3.0-pr.37068.f95e11e",
|
|
136
|
+
"@nx/webpack": "23.3.0-pr.37068.f95e11e",
|
|
137
|
+
"@nx/storybook": "23.3.0-pr.37068.f95e11e",
|
|
138
|
+
"nx": "23.3.0-pr.37068.f95e11e"
|
|
139
139
|
},
|
|
140
140
|
"optionalDependencies": {
|
|
141
|
-
"@nx/vite": "23.3.0-pr.
|
|
141
|
+
"@nx/vite": "23.3.0-pr.37068.f95e11e"
|
|
142
142
|
},
|
|
143
143
|
"publishConfig": {
|
|
144
144
|
"access": "public"
|