File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -442,12 +442,12 @@ export function transformJsxToString(
442
442
{
443
443
debug,
444
444
plugins,
445
- id = '' ,
445
+ id,
446
446
} : Pick < OptionsResolved , 'debug' | 'plugins' > & { id ?: string } ,
447
447
) : { code : string ; map : any } {
448
448
const s = new MagicString ( code )
449
449
450
- if ( id . endsWith ( '.tsx' ) ) plugins . push ( 'typescript' )
450
+ if ( id ? .endsWith ( '.tsx' ) ) plugins . push ( 'typescript' )
451
451
const nodes = extractJsx ( code , plugins )
452
452
453
453
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'
4
4
import { resolveOptions , type Options } from './core/options'
5
5
6
6
declare global {
7
- // @ts -expect-error missing JSX
7
+ // @ts -ignore
8
8
const jsxToString : ( element : JSX . Element ) => string
9
9
const jsxRaw : ( variable : any ) => any
10
10
}
You can’t perform that action at this time.
0 commit comments