Skip to content

Commit 73a45a5

Browse files
committed
feat: add rolldown-vite only error
1 parent 5b41dc5 commit 73a45a5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/plugin-react-oxc/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
6262
},
6363
}
6464
},
65+
options() {
66+
if (!this.meta.rolldownVersion) {
67+
throw new Error(
68+
'@vitejs/plugin-react-oxc requires rolldown-vite to be used. ' +
69+
'See https://vitejs.dev/guide/rolldown for more details about rolldown-vite.',
70+
)
71+
}
72+
},
6573
}
6674

6775
const viteRefreshRuntime: Plugin = {

0 commit comments

Comments
 (0)