Skip to content

Commit ea5f791

Browse files
authored
fix: use same code path as Vite 6 for Vite 7 (#218)
* fix: use same code path as Vite 6 for Vite 7 * chore: add changeset
1 parent 4fd7a5d commit ea5f791

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/shy-doors-walk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'vite-plugin-solid': patch
3+
---
4+
5+
Fix Vite 7+ compatibility.

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const runtimePublicPath = '/@solid-refresh';
1414
const runtimeFilePath = require.resolve('solid-refresh/dist/solid-refresh.mjs');
1515
const runtimeCode = readFileSync(runtimeFilePath, 'utf-8');
1616

17-
const isVite6 = version.startsWith('6.');
17+
const isVite6 = +version.split('.')[0] >= 6;
1818

1919
/** Possible options for the extensions property */
2020
export interface ExtensionOptions {

0 commit comments

Comments
 (0)