@nx/react 20.3.0-beta.0 → 20.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/react",
3
- "version": "20.3.0-beta.0",
3
+ "version": "20.3.0-beta.1",
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": {
@@ -38,11 +38,11 @@
38
38
  "minimatch": "9.0.3",
39
39
  "picocolors": "^1.1.0",
40
40
  "tslib": "^2.3.0",
41
- "@nx/devkit": "20.3.0-beta.0",
42
- "@nx/js": "20.3.0-beta.0",
43
- "@nx/eslint": "20.3.0-beta.0",
44
- "@nx/web": "20.3.0-beta.0",
45
- "@nx/module-federation": "20.3.0-beta.0",
41
+ "@nx/devkit": "20.3.0-beta.1",
42
+ "@nx/js": "20.3.0-beta.1",
43
+ "@nx/eslint": "20.3.0-beta.1",
44
+ "@nx/web": "20.3.0-beta.1",
45
+ "@nx/module-federation": "20.3.0-beta.1",
46
46
  "express": "^4.19.2",
47
47
  "http-proxy-middleware": "^3.0.3"
48
48
  },
@@ -80,7 +80,9 @@ function addHotReload(config) {
80
80
  // We remove potentially conflicting rules that target SVGs because we use @svgr/webpack loader
81
81
  // See https://github.com/nrwl/nx/issues/14383
82
82
  function removeSvgLoaderIfPresent(config) {
83
- const svgLoaderIdx = config.module.rules.findIndex((rule) => typeof rule === 'object' && rule.test.toString().includes('svg'));
83
+ const svgLoaderIdx = config.module.rules.findIndex((rule) => typeof rule === 'object' &&
84
+ typeof rule.test !== 'undefined' &&
85
+ rule.test.toString().includes('svg'));
84
86
  if (svgLoaderIdx === -1)
85
87
  return;
86
88
  config.module.rules.splice(svgLoaderIdx, 1);
@@ -264,7 +264,9 @@ async function applicationGeneratorInternal(host, schema) {
264
264
  jsx: 'react-jsx',
265
265
  module: 'esnext',
266
266
  moduleResolution: 'bundler',
267
- });
267
+ }, options.linter === 'eslint'
268
+ ? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
269
+ : undefined);
268
270
  if (!options.skipFormat) {
269
271
  await (0, devkit_1.formatFiles)(host);
270
272
  }
@@ -51,15 +51,15 @@
51
51
  },
52
52
  {
53
53
  "value": "scss",
54
- "label": "SASS(.scss) [ https://sass-lang.com ]"
54
+ "label": "SASS(.scss) [ https://sass-lang.com ]"
55
55
  },
56
56
  {
57
57
  "value": "less",
58
- "label": "LESS [ https://lesscss.org ]"
58
+ "label": "LESS [ https://lesscss.org ]"
59
59
  },
60
60
  {
61
61
  "value": "tailwind",
62
- "label": "tailwind [ https://tailwindcss.com/ ]"
62
+ "label": "tailwind [ https://tailwindcss.com/ ]"
63
63
  },
64
64
  {
65
65
  "value": "styled-components",
@@ -6,7 +6,7 @@ import { Route, Link } from 'react-router-dom';
6
6
  <%_ } _%>
7
7
 
8
8
  <%_ if (hasStyles) {
9
- if (styledModule && styledModule !== 'styled-jsx') {
9
+ if (styledModule && styledModule !== 'styled-jsx' && styledModule !== 'tailwind') {
10
10
  var wrapper = 'Styled' + className;
11
11
  var extras = '';
12
12
  _%>
@@ -15,14 +15,14 @@ import styled from '<%= styledModule %>';
15
15
  var wrapper = 'div';
16
16
  var extras = globalCss || styledModule === 'styled-jsx' ? '' : " className={styles['container']}";
17
17
  _%>
18
- <%- style !== 'styled-jsx' ? globalCss ? `import './${fileName}.${style}';` : `import styles from './${fileName}.module.${style}';`: '' %>
18
+ <%- style !== 'styled-jsx' && style!== 'tailwind' ? globalCss ? `import './${fileName}.${style}';` : `import styles from './${fileName}.module.${style}';`: '' %>
19
19
  <%_ }
20
20
  } else {
21
21
  var wrapper = 'div';
22
22
  var extras = '';
23
23
  } _%>
24
24
 
25
- <%_ if (styledModule && styledModule !== 'styled-jsx') { _%>
25
+ <%_ if (styledModule && styledModule !== 'styled-jsx' && styledModule !== 'tailwind') { _%>
26
26
  const Styled<%= className %> = styled.div`
27
27
  color: pink;
28
28
  `;
@@ -41,6 +41,10 @@
41
41
  "value": "less",
42
42
  "label": "LESS [ https://lesscss.org ]"
43
43
  },
44
+ {
45
+ "value": "tailwind",
46
+ "label": "tailwind [ https://tailwindcss.com/ ]"
47
+ },
44
48
  {
45
49
  "value": "styled-components",
46
50
  "label": "styled-components [ https://styled-components.com ]"
@@ -222,7 +222,7 @@ async function libraryGeneratorInternal(host, schema) {
222
222
  }
223
223
  // Always run install to link packages.
224
224
  if (options.isUsingTsSolutionConfig) {
225
- tasks.push(() => (0, devkit_1.installPackagesTask)(host));
225
+ tasks.push(() => (0, devkit_1.installPackagesTask)(host, true));
226
226
  }
227
227
  tasks.push(() => {
228
228
  (0, log_show_project_command_1.logShowProjectCommand)(options.name);
@@ -52,6 +52,10 @@
52
52
  "value": "less",
53
53
  "label": "LESS [ https://lesscss.org ]"
54
54
  },
55
+ {
56
+ "value": "tailwind",
57
+ "label": "tailwind [ https://tailwindcss.com/ ]"
58
+ },
55
59
  {
56
60
  "value": "styled-components",
57
61
  "label": "styled-components [ https://styled-components.com ]"