Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c5a974

Browse files
authored
Revert Vite from 7.x to 6.2.7 for stability (#562)
revert: downgrade Vite from 7.x to 6.2.7 for stability - Revert vite from ^7.1.5 to ^6.2.7 - Revert @vitejs/plugin-react-swc from ^4.0.1 to ^3.9.0 - Revert vite-plugin-checker from ^0.10.3 to ^0.9.1 - Revert vite-plugin-svgr from ^4.5.0 to ^4.3.0 - Add vite-plugin-externalize-deps ^0.9.0 for Vite 6 compatibility - Update vite.config.ts to use externalizeDeps plugin instead of manual externalization - Keep all other dependencies at current versions
1 parent 3104466 commit 2c5a974

File tree

3 files changed

+51
-141
lines changed

3 files changed

+51
-141
lines changed

package-lock.json

Lines changed: 44 additions & 129 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"@types/jest-axe": "^3.5.9",
7272
"@types/js-yaml": "^4.0.9",
7373
"@types/react": "^19.1.13",
74-
"@vitejs/plugin-react-swc": "^4.0.1",
74+
"@vitejs/plugin-react-swc": "^3.9.0",
7575
"@vitest/coverage-v8": "^3.2.4",
7676
"axe-core": "^4.10.2",
7777
"dotenv": "^17.2.2",
@@ -95,12 +95,13 @@
9595
"ts-morph": "^27.0.0",
9696
"tsx": "^4.20.5",
9797
"typescript-eslint": "^8.44.0",
98-
"vite": "^7.1.5",
99-
"vite-plugin-checker": "^0.10.3",
98+
"vite": "^6.2.7",
99+
"vite-plugin-checker": "^0.9.1",
100100
"vite-plugin-circular-dependency": "^0.5.0",
101101
"vite-plugin-dts": "^4.5.3",
102+
"vite-plugin-externalize-deps": "^0.9.0",
102103
"vite-plugin-stylelint": "^6.0.2",
103-
"vite-plugin-svgr": "^4.5.0",
104+
"vite-plugin-svgr": "^4.3.0",
104105
"vitest": "^3.2.4"
105106
},
106107
"peerDependencies": {

vite.config.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import stylelint from 'vite-plugin-stylelint'
77
import svgr from 'vite-plugin-svgr'
88
import circularDependencyDetector from 'vite-plugin-circular-dependency'
99
import checker from 'vite-plugin-checker'
10+
import { externalizeDeps } from 'vite-plugin-externalize-deps'
1011

1112
/**
1213
* Current config is set to build sdk in library mode, retaining the original file structure and file names while also allowing for css modules and single css file output.
@@ -17,6 +18,7 @@ export default defineConfig(({ mode }) => {
1718
return {
1819
plugins: [
1920
react(),
21+
externalizeDeps(), // Externalizes all dependencies
2022
!isDev &&
2123
dts({
2224
include: ['src', 'src/types/i18next.d.ts'],
@@ -81,14 +83,6 @@ export default defineConfig(({ mode }) => {
8183
cssCodeSplit: false,
8284
rollupOptions: {
8385
input: resolve(__dirname, 'src/index.ts'),
84-
external: id => {
85-
// Externalize all node_modules dependencies
86-
return (
87-
id.startsWith('node:') ||
88-
/^[a-zA-Z][a-zA-Z0-9@\-_/]*$/.test(id) ||
89-
id.includes('node_modules')
90-
)
91-
},
9286
output: {
9387
preserveModules: true,
9488
preserveModulesRoot: 'src',

0 commit comments

Comments
 (0)