From 55230b1e973b0084372a079082178d38f20f7116 Mon Sep 17 00:00:00 2001 From: Maifee Ul Asad Date: Tue, 29 Apr 2025 15:44:17 +0600 Subject: [PATCH 1/3] [deps]: added `@vitejs/plugin-react-swc`; --- package.json | 1 + pnpm-lock.yaml | 142 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+) diff --git a/package.json b/package.json index 261cdbf..1fcce67 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@testing-library/user-event": "^13.5.0", "@vitejs/plugin-react": "^1.3.2", "@vitejs/plugin-react-refresh": "^1.3.6", + "@vitejs/plugin-react-swc": "^3.9.0", "antd": "^5.24.9", "antd-crud-table": "^0.0.10", "copy-clipboard-js": "^2.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76b8f44..18de91f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: '@vitejs/plugin-react-refresh': specifier: ^1.3.6 version: 1.3.6 + '@vitejs/plugin-react-swc': + specifier: ^3.9.0 + version: 3.9.0(vite@6.3.3(@types/node@18.19.87)(jiti@1.21.7)(sass@1.87.0)(terser@5.39.0)(yaml@2.7.1)) antd: specifier: ^5.24.9 version: 5.24.9(date-fns@4.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1467,6 +1470,81 @@ packages: peerDependencies: '@svgr/core': ^6.0.0 + '@swc/core-darwin-arm64@1.11.21': + resolution: {integrity: sha512-v6gjw9YFWvKulCw3ZA1dY+LGMafYzJksm1mD4UZFZ9b36CyHFowYVYug1ajYRIRqEvvfIhHUNV660zTLoVFR8g==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + + '@swc/core-darwin-x64@1.11.21': + resolution: {integrity: sha512-CUiTiqKlzskwswrx9Ve5NhNoab30L1/ScOfQwr1duvNlFvarC8fvQSgdtpw2Zh3MfnfNPpyLZnYg7ah4kbT9JQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + + '@swc/core-linux-arm-gnueabihf@1.11.21': + resolution: {integrity: sha512-YyBTAFM/QPqt1PscD8hDmCLnqPGKmUZpqeE25HXY8OLjl2MUs8+O4KjwPZZ+OGxpdTbwuWFyMoxjcLy80JODvg==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + + '@swc/core-linux-arm64-gnu@1.11.21': + resolution: {integrity: sha512-DQD+ooJmwpNsh4acrftdkuwl5LNxxg8U4+C/RJNDd7m5FP9Wo4c0URi5U0a9Vk/6sQNh9aSGcYChDpqCDWEcBw==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-arm64-musl@1.11.21': + resolution: {integrity: sha512-y1L49+snt1a1gLTYPY641slqy55QotPdtRK9Y6jMi4JBQyZwxC8swWYlQWb+MyILwxA614fi62SCNZNznB3XSA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-x64-gnu@1.11.21': + resolution: {integrity: sha512-NesdBXv4CvVEaFUlqKj+GA4jJMNUzK2NtKOrUNEtTbXaVyNiXjFCSaDajMTedEB0jTAd9ybB0aBvwhgkJUWkWA==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-linux-x64-musl@1.11.21': + resolution: {integrity: sha512-qFV60pwpKVOdmX67wqQzgtSrUGWX9Cibnp1CXyqZ9Mmt8UyYGvmGu7p6PMbTyX7vdpVUvWVRf8DzrW2//wmVHg==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-win32-arm64-msvc@1.11.21': + resolution: {integrity: sha512-DJJe9k6gXR/15ZZVLv1SKhXkFst8lYCeZRNHH99SlBodvu4slhh/MKQ6YCixINRhCwliHrpXPym8/5fOq8b7Ig==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + + '@swc/core-win32-ia32-msvc@1.11.21': + resolution: {integrity: sha512-TqEXuy6wedId7bMwLIr9byds+mKsaXVHctTN88R1UIBPwJA92Pdk0uxDgip0pEFzHB/ugU27g6d8cwUH3h2eIw==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + + '@swc/core-win32-x64-msvc@1.11.21': + resolution: {integrity: sha512-BT9BNNbMxdpUM1PPAkYtviaV0A8QcXttjs2MDtOeSqqvSJaPtyM+Fof2/+xSwQDmDEFzbGCcn75M5+xy3lGqpA==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + + '@swc/core@1.11.21': + resolution: {integrity: sha512-/Y3BJLcwd40pExmdar8MH2UGGvCBrqNN7hauOMckrEX2Ivcbv3IMhrbGX4od1dnF880Ed8y/E9aStZCIQi0EGw==} + engines: {node: '>=10'} + peerDependencies: + '@swc/helpers': '>=0.5.17' + peerDependenciesMeta: + '@swc/helpers': + optional: true + + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + + '@swc/types@0.1.21': + resolution: {integrity: sha512-2YEtj5HJVbKivud9N4bpPBAyZhj4S2Ipe5LkUG94alTpr7in/GU/EARgPAd3BwU+YOmFVJC2+kjqhGRi3r0ZpQ==} + '@testing-library/dom@8.20.1': resolution: {integrity: sha512-/DiOQ5xBxgdYRC8LNk7U+RWat0S3qRLeIw3ZIkMQ9kkVlRmwD/Eg8k8CqIpD6GW7u20JIUOfMKbxtiLutpjQ4g==} engines: {node: '>=12'} @@ -1621,6 +1699,11 @@ packages: engines: {node: '>=12.0.0'} deprecated: This package has been deprecated in favor of @vitejs/plugin-react + '@vitejs/plugin-react-swc@3.9.0': + resolution: {integrity: sha512-jYFUSXhwMCYsh/aQTgSGLIN3Foz5wMbH9ahb0Zva//UzwZYbMiZd7oT3AU9jHT9DLswYDswsRwPU9jVF3yA48Q==} + peerDependencies: + vite: ^4 || ^5 || ^6 + '@vitejs/plugin-react@1.3.2': resolution: {integrity: sha512-aurBNmMo0kz1O4qRoY+FM4epSA39y3ShWGuqfLRA/3z0oEJAdtoSfgA3aO98/PCCHAqMaduLxIxErWrVKIFzXA==} engines: {node: '>=12.0.0'} @@ -6138,6 +6221,58 @@ snapshots: transitivePeerDependencies: - supports-color + '@swc/core-darwin-arm64@1.11.21': + optional: true + + '@swc/core-darwin-x64@1.11.21': + optional: true + + '@swc/core-linux-arm-gnueabihf@1.11.21': + optional: true + + '@swc/core-linux-arm64-gnu@1.11.21': + optional: true + + '@swc/core-linux-arm64-musl@1.11.21': + optional: true + + '@swc/core-linux-x64-gnu@1.11.21': + optional: true + + '@swc/core-linux-x64-musl@1.11.21': + optional: true + + '@swc/core-win32-arm64-msvc@1.11.21': + optional: true + + '@swc/core-win32-ia32-msvc@1.11.21': + optional: true + + '@swc/core-win32-x64-msvc@1.11.21': + optional: true + + '@swc/core@1.11.21': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.21 + optionalDependencies: + '@swc/core-darwin-arm64': 1.11.21 + '@swc/core-darwin-x64': 1.11.21 + '@swc/core-linux-arm-gnueabihf': 1.11.21 + '@swc/core-linux-arm64-gnu': 1.11.21 + '@swc/core-linux-arm64-musl': 1.11.21 + '@swc/core-linux-x64-gnu': 1.11.21 + '@swc/core-linux-x64-musl': 1.11.21 + '@swc/core-win32-arm64-msvc': 1.11.21 + '@swc/core-win32-ia32-msvc': 1.11.21 + '@swc/core-win32-x64-msvc': 1.11.21 + + '@swc/counter@0.1.3': {} + + '@swc/types@0.1.21': + dependencies: + '@swc/counter': 0.1.3 + '@testing-library/dom@8.20.1': dependencies: '@babel/code-frame': 7.26.2 @@ -6331,6 +6466,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitejs/plugin-react-swc@3.9.0(vite@6.3.3(@types/node@18.19.87)(jiti@1.21.7)(sass@1.87.0)(terser@5.39.0)(yaml@2.7.1))': + dependencies: + '@swc/core': 1.11.21 + vite: 6.3.3(@types/node@18.19.87)(jiti@1.21.7)(sass@1.87.0)(terser@5.39.0)(yaml@2.7.1) + transitivePeerDependencies: + - '@swc/helpers' + '@vitejs/plugin-react@1.3.2': dependencies: '@babel/core': 7.26.10 From 309d3ffe226066e75f43e29da4e462eef2ad02c8 Mon Sep 17 00:00:00 2001 From: Maifee Ul Asad Date: Tue, 29 Apr 2025 15:44:51 +0600 Subject: [PATCH 2/3] [deps]: removed `@vitejs/plugin-react`; --- package.json | 1 - pnpm-lock.yaml | 67 -------------------------------------------------- 2 files changed, 68 deletions(-) diff --git a/package.json b/package.json index 1fcce67..0cb986c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", - "@vitejs/plugin-react": "^1.3.2", "@vitejs/plugin-react-refresh": "^1.3.6", "@vitejs/plugin-react-swc": "^3.9.0", "antd": "^5.24.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 18de91f..9488b2e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,9 +26,6 @@ importers: '@testing-library/user-event': specifier: ^13.5.0 version: 13.5.0(@testing-library/dom@8.20.1) - '@vitejs/plugin-react': - specifier: ^1.3.2 - version: 1.3.2 '@vitejs/plugin-react-refresh': specifier: ^1.3.6 version: 1.3.6 @@ -452,12 +449,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.25.9': - resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6': resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} engines: {node: '>=6.9.0'} @@ -692,12 +683,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx-development@7.25.9': - resolution: {integrity: sha512-9mj6rm7XVYs4mdLIpbZnHOYdpW42uoiBCTVowg7sP1thUOiANgMb4UtpRivR0pp5iL+ocvUv7X4mZgFRpJEzGw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx-self@7.25.9': resolution: {integrity: sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==} engines: {node: '>=6.9.0'} @@ -710,12 +695,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-react-jsx@7.25.9': - resolution: {integrity: sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-regenerator@7.27.0': resolution: {integrity: sha512-LX/vCajUJQDqE7Aum/ELUMZAY19+cDpghxrnyt5I1tV6X5PyC86AOoWXWFYFeIvauyeSA6/ktn4tQVn/3ZifsA==} engines: {node: '>=6.9.0'} @@ -1704,10 +1683,6 @@ packages: peerDependencies: vite: ^4 || ^5 || ^6 - '@vitejs/plugin-react@1.3.2': - resolution: {integrity: sha512-aurBNmMo0kz1O4qRoY+FM4epSA39y3ShWGuqfLRA/3z0oEJAdtoSfgA3aO98/PCCHAqMaduLxIxErWrVKIFzXA==} - engines: {node: '>=12.0.0'} - acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -3875,10 +3850,6 @@ packages: resolution: {integrity: sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ==} engines: {node: '>=0.10.0'} - react-refresh@0.13.0: - resolution: {integrity: sha512-XP8A9BT0CpRBD+NYLLeIhld/RqG9+gktUjW1FkE+Vm7OCinbG1SshcK5tb9ls4kzvjZr9mOQc7HYgBngEyPAXg==} - engines: {node: '>=0.10.0'} - react-router-dom@6.30.0: resolution: {integrity: sha512-x30B78HV5tFk8ex0ITwzC9TTZMua4jGyA9IUlH1JLQYQTFyxr/ZxwOJq7evg1JX1qGVUcvhsmQSKdPncQrjTgA==} engines: {node: '>=14.0.0'} @@ -5181,11 +5152,6 @@ snapshots: '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 @@ -5443,13 +5409,6 @@ snapshots: '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-react-jsx-development@7.25.9(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.10) - transitivePeerDependencies: - - supports-color - '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 @@ -5460,17 +5419,6 @@ snapshots: '@babel/core': 7.26.10 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-react-jsx@7.25.9(@babel/core@7.26.10)': - dependencies: - '@babel/core': 7.26.10 - '@babel/helper-annotate-as-pure': 7.25.9 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.10) - '@babel/types': 7.27.0 - transitivePeerDependencies: - - supports-color - '@babel/plugin-transform-regenerator@7.27.0(@babel/core@7.26.10)': dependencies: '@babel/core': 7.26.10 @@ -6473,19 +6421,6 @@ snapshots: transitivePeerDependencies: - '@swc/helpers' - '@vitejs/plugin-react@1.3.2': - dependencies: - '@babel/core': 7.26.10 - '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-react-jsx-development': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.10) - '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.10) - '@rollup/pluginutils': 4.2.1 - react-refresh: 0.13.0 - resolve: 1.22.10 - transitivePeerDependencies: - - supports-color - acorn-jsx@5.3.2(acorn@8.14.1): dependencies: acorn: 8.14.1 @@ -9029,8 +8964,6 @@ snapshots: react-refresh@0.10.0: {} - react-refresh@0.13.0: {} - react-router-dom@6.30.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@remix-run/router': 1.23.0 From 3643c61d9f59506561d678b232781ab82f1e2d50 Mon Sep 17 00:00:00 2001 From: Maifee Ul Asad Date: Tue, 29 Apr 2025 15:45:32 +0600 Subject: [PATCH 3/3] [vite,config]: using `react` from `@vitejs/plugin-react-swc`, instead of `@vitejs/plugin-react`; --- vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index d21385e..d772096 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import { defineConfig, type PluginOption } from 'vite'; import svgrPlugin from 'vite-plugin-svgr'; -import react from '@vitejs/plugin-react'; +import react from '@vitejs/plugin-react-swc'; import ViteVisualizer from 'rollup-plugin-visualizer'; import { VitePWA } from 'vite-plugin-pwa' import { VitePluginRadar } from 'vite-plugin-radar';