Skip to content

Commit

Permalink
fix: preview not working for Vite 4
Browse files Browse the repository at this point in the history
close #2198
  • Loading branch information
johnsoncodehk committed Dec 18, 2022
1 parent d247bb7 commit 390010b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/preview/bin/vite.js
Expand Up @@ -75,7 +75,7 @@ fs.readFileSync = (...args) => {

createViteConfig();

if (viteVersion.startsWith('3.')) {
if (Number(viteVersion.split('.')[0]) >= 3) {
import('file://' + viteBinPath);
}
else {
Expand Down

0 comments on commit 390010b

Please sign in to comment.