@nx/react 20.0.0-canary.20240925-6182d20 → 20.0.0-canary.20240928-f221a41
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/package.json +6 -7
- package/plugins/storybook/index.js +1 -2
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +0 -2
- package/src/generators/setup-tailwind/lib/update-project.js +1 -2
- package/src/generators/storybook-configuration/configuration.js +0 -1
- package/src/utils/ct-utils.js +2 -7
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/react",
|
3
|
-
"version": "20.0.0-canary.
|
3
|
+
"version": "20.0.0-canary.20240928-f221a41",
|
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": {
|
@@ -39,13 +39,12 @@
|
|
39
39
|
"minimatch": "9.0.3",
|
40
40
|
"tslib": "^2.3.0",
|
41
41
|
"@module-federation/enhanced": "~0.6.0",
|
42
|
-
"@nx/devkit": "20.0.0-canary.
|
43
|
-
"@nx/js": "20.0.0-canary.
|
44
|
-
"@nx/eslint": "20.0.0-canary.
|
45
|
-
"@nx/web": "20.0.0-canary.
|
42
|
+
"@nx/devkit": "20.0.0-canary.20240928-f221a41",
|
43
|
+
"@nx/js": "20.0.0-canary.20240928-f221a41",
|
44
|
+
"@nx/eslint": "20.0.0-canary.20240928-f221a41",
|
45
|
+
"@nx/web": "20.0.0-canary.20240928-f221a41",
|
46
46
|
"express": "^4.19.2",
|
47
|
-
"http-proxy-middleware": "^3.0.0"
|
48
|
-
"@nrwl/react": "20.0.0-canary.20240925-6182d20"
|
47
|
+
"http-proxy-middleware": "^3.0.0"
|
49
48
|
},
|
50
49
|
"publishConfig": {
|
51
50
|
"access": "public"
|
@@ -73,8 +73,7 @@ const fixBabelConfigurationIfNeeded = (webpackConfig, projectData) => {
|
|
73
73
|
return;
|
74
74
|
const isUsingBabelUpwardRootMode = Object.keys(projectData.projectNode.data.targets).find((k) => {
|
75
75
|
const targetConfig = projectData.projectNode.data.targets[k];
|
76
|
-
return (
|
77
|
-
targetConfig.executor === '@nrwl/webpack:webpack') &&
|
76
|
+
return (targetConfig.executor === '@nx/webpack:webpack' &&
|
78
77
|
targetConfig.options?.babelUpwardRootMode);
|
79
78
|
});
|
80
79
|
if (isUsingBabelUpwardRootMode)
|
@@ -37,8 +37,6 @@ async function cypressComponentConfigGeneratorInternal(tree, options) {
|
|
37
37
|
validExecutorNames: new Set([
|
38
38
|
'@nx/webpack:webpack',
|
39
39
|
'@nx/vite:build',
|
40
|
-
'@nrwl/webpack:webpack',
|
41
|
-
'@nrwl/vite:build',
|
42
40
|
]),
|
43
41
|
});
|
44
42
|
await (0, add_files_1.addFiles)(tree, projectConfig, options, found);
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateProject = updateProject;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
function updateProject(tree, config, options) {
|
6
|
-
if (config?.targets?.build?.executor === '@nx/webpack:webpack'
|
7
|
-
config?.targets?.build?.executor === '@nrwl/webpack:webpack') {
|
6
|
+
if (config?.targets?.build?.executor === '@nx/webpack:webpack') {
|
8
7
|
config.targets.build.options ??= {};
|
9
8
|
config.targets.build.options.postcssConfig = (0, devkit_1.joinPathFragments)(config.root, 'postcss.config.js');
|
10
9
|
(0, devkit_1.updateProjectConfiguration)(tree, options.project, config);
|
@@ -33,7 +33,6 @@ async function storybookConfigurationGeneratorInternal(host, schema) {
|
|
33
33
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(host, schema.project);
|
34
34
|
if (findWebpackConfig(host, projectConfig.root) ||
|
35
35
|
projectConfig.targets['build']?.executor === '@nx/rollup:rollup' ||
|
36
|
-
projectConfig.targets['build']?.executor === '@nrwl/rollup:rollup' ||
|
37
36
|
projectConfig.targets['build']?.executor === '@nx/expo:build') {
|
38
37
|
uiFramework = '@storybook/react-webpack5';
|
39
38
|
}
|
package/src/utils/ct-utils.js
CHANGED
@@ -60,17 +60,12 @@ function assertValidConfig(config) {
|
|
60
60
|
}
|
61
61
|
async function getBundlerFromTarget(found, tree) {
|
62
62
|
if (found.target && found.config?.executor) {
|
63
|
-
return found.config.executor === '@
|
64
|
-
found.config.executor === '@nx/vite:build'
|
65
|
-
? 'vite'
|
66
|
-
: 'webpack';
|
63
|
+
return found.config.executor === '@nx/vite:build' ? 'vite' : 'webpack';
|
67
64
|
}
|
68
65
|
const { target, project } = (0, devkit_1.parseTargetString)(found.target, await (0, devkit_1.createProjectGraphAsync)());
|
69
66
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
|
70
67
|
const executor = projectConfig?.targets?.[target]?.executor;
|
71
|
-
return executor === '@
|
72
|
-
? 'vite'
|
73
|
-
: 'webpack';
|
68
|
+
return executor === '@nx/vite:build' ? 'vite' : 'webpack';
|
74
69
|
}
|
75
70
|
async function getActualBundler(tree, options, found) {
|
76
71
|
// Specifically undefined to allow Remix workaround of passing an empty string
|