@nx/react 22.5.0-beta.0 → 22.5.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": "22.5.0-beta.0",
3
+ "version": "22.5.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": {
@@ -34,32 +34,31 @@
34
34
  "dependencies": {
35
35
  "@phenomnomnominal/tsquery": "~6.1.4",
36
36
  "@svgr/webpack": "^8.0.1",
37
- "file-loader": "^6.2.0",
38
37
  "minimatch": "10.1.1",
39
38
  "picocolors": "^1.1.0",
40
39
  "tslib": "^2.3.0",
41
- "@nx/devkit": "22.5.0-beta.0",
42
- "@nx/js": "22.5.0-beta.0",
43
- "@nx/eslint": "22.5.0-beta.0",
44
- "@nx/web": "22.5.0-beta.0",
45
- "@nx/module-federation": "22.5.0-beta.0",
46
- "@nx/rollup": "22.5.0-beta.0",
40
+ "@nx/devkit": "22.5.0-beta.1",
41
+ "@nx/js": "22.5.0-beta.1",
42
+ "@nx/eslint": "22.5.0-beta.1",
43
+ "@nx/web": "22.5.0-beta.1",
44
+ "@nx/module-federation": "22.5.0-beta.1",
45
+ "@nx/rollup": "22.5.0-beta.1",
47
46
  "express": "^4.21.2",
48
47
  "http-proxy-middleware": "^3.0.5",
49
48
  "semver": "^7.6.3"
50
49
  },
51
50
  "devDependencies": {
52
- "@nx/cypress": "22.5.0-beta.0",
53
- "@nx/playwright": "22.5.0-beta.0",
54
- "@nx/rsbuild": "22.5.0-beta.0",
55
- "@nx/vite": "22.5.0-beta.0",
56
- "@nx/vitest": "22.5.0-beta.0",
57
- "@nx/webpack": "22.5.0-beta.0",
58
- "@nx/storybook": "22.5.0-beta.0",
59
- "nx": "22.5.0-beta.0"
51
+ "@nx/cypress": "22.5.0-beta.1",
52
+ "@nx/playwright": "22.5.0-beta.1",
53
+ "@nx/rsbuild": "22.5.0-beta.1",
54
+ "@nx/vite": "22.5.0-beta.1",
55
+ "@nx/vitest": "22.5.0-beta.1",
56
+ "@nx/webpack": "22.5.0-beta.1",
57
+ "@nx/storybook": "22.5.0-beta.1",
58
+ "nx": "22.5.0-beta.1"
60
59
  },
61
60
  "optionalDependencies": {
62
- "@nx/vite": "22.5.0-beta.0"
61
+ "@nx/vite": "22.5.0-beta.1"
63
62
  },
64
63
  "publishConfig": {
65
64
  "access": "public"
@@ -1,3 +1,3 @@
1
1
  import { type Tree } from '@nx/devkit';
2
- export default function addSvgrToWebpackConfig(tree: Tree): Promise<import("@nx/devkit").GeneratorCallback>;
2
+ export default function addSvgrToWebpackConfig(tree: Tree): Promise<void>;
3
3
  //# sourceMappingURL=add-svgr-to-webpack-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-svgr-to-webpack-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-22-0-0/add-svgr-to-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAOV,MAAM,YAAY,CAAC;AAuGpB,wBAA8B,sBAAsB,CAAC,IAAI,EAAE,IAAI,mDA+X9D"}
1
+ {"version":3,"file":"add-svgr-to-webpack-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-22-0-0/add-svgr-to-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAiHpB,wBAA8B,sBAAsB,CAAC,IAAI,EAAE,IAAI,iBAsX9D"}
@@ -30,20 +30,25 @@ function withSvgr(svgrOptions = {}) {
30
30
  config.module.rules.splice(svgLoaderIdx, 1);
31
31
  }
32
32
 
33
- // Add SVGR loader
33
+ // Add SVGR loader with webpack 5 asset modules
34
34
  config.module.rules.push({
35
35
  test: /\\.svg$/,
36
- issuer: /\\.(js|ts|md)x?$/,
37
- use: [
36
+ oneOf: [
38
37
  {
39
- loader: require.resolve('@svgr/webpack'),
40
- options,
38
+ resourceQuery: /url/,
39
+ type: 'asset/resource',
40
+ generator: {
41
+ filename: '[name].[hash][ext]',
42
+ },
41
43
  },
42
44
  {
43
- loader: require.resolve('file-loader'),
44
- options: {
45
- name: '[name].[hash].[ext]',
46
- },
45
+ issuer: /\\.(js|ts|md)x?$/,
46
+ use: [
47
+ {
48
+ loader: require.resolve('@svgr/webpack'),
49
+ options,
50
+ },
51
+ ],
47
52
  },
48
53
  ],
49
54
  });
@@ -78,20 +83,25 @@ function withSvgr(svgrOptions = {}) {
78
83
  )
79
84
  );
80
85
 
81
- // Add SVGR loader with both default and named exports
86
+ // Add SVGR loader with webpack 5 asset modules
82
87
  compiler.options.module.rules.push({
83
88
  test: /\.svg$/,
84
- issuer: /\.[jt]sx?$/,
85
- use: [
89
+ oneOf: [
86
90
  {
87
- loader: require.resolve('@svgr/webpack'),
88
- options,
91
+ resourceQuery: /url/,
92
+ type: 'asset/resource',
93
+ generator: {
94
+ filename: '[name].[hash][ext]',
95
+ },
89
96
  },
90
97
  {
91
- loader: require.resolve('file-loader'),
92
- options: {
93
- name: '[name].[hash].[ext]',
94
- },
98
+ issuer: /\.[jt]sx?$/,
99
+ use: [
100
+ {
101
+ loader: require.resolve('@svgr/webpack'),
102
+ options,
103
+ },
104
+ ],
95
105
  },
96
106
  ],
97
107
  });
@@ -396,8 +406,4 @@ async function addSvgrToWebpackConfig(tree) {
396
406
  tree.write(webpackConfigPath, content);
397
407
  }
398
408
  await (0, devkit_1.formatFiles)(tree);
399
- // Add file-loader as a dev dependency since it's now required for SVGR
400
- return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
401
- 'file-loader': '^6.2.0',
402
- });
403
409
  }