mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
71c2fb05bc
Improved the error message when JSX syntax is found while not enabled. The idea came from esbuild's error message ([esbuild try](https://esbuild.github.io/try/#dAAwLjI3LjAAAGV4cG9ydCBjb25zdCBmb28gPSA8Rm9vIC8+Ow)). **Before** ``` x Unexpected token ,-[:1:20] 1 | export const foo = <Foo />; : ^ `---- ``` **After** ``` × Unexpected JSX expression ╭─[misc/fail/jsx-in-js.js:1:20] 1 │ export const foo = <Foo />; · ─────── ╰──── help: JSX syntax is disabled and should be enabled via the parser options ```
2 lines
25 B
JavaScript
2 lines
25 B
JavaScript
export const foo = <Foo;
|