File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -442,12 +442,12 @@ export function transformJsxToString(
442442 {
443443 debug,
444444 plugins,
445- id = '' ,
445+ id,
446446 } : Pick < OptionsResolved , 'debug' | 'plugins' > & { id ?: string } ,
447447) : { code : string ; map : any } {
448448 const s = new MagicString ( code )
449449
450- if ( id . endsWith ( '.tsx' ) ) plugins . push ( 'typescript' )
450+ if ( id ? .endsWith ( '.tsx' ) ) plugins . push ( 'typescript' )
451451 const nodes = extractJsx ( code , plugins )
452452
453453 for ( const [ node , expr ] of nodes ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { transformJsxToString } from './core/convert'
44import { resolveOptions , type Options } from './core/options'
55
66declare global {
7- // @ts -expect-error missing JSX
7+ // @ts -ignore
88 const jsxToString : ( element : JSX . Element ) => string
99 const jsxRaw : ( variable : any ) => any
1010}
You can’t perform that action at this time.
0 commit comments