tsx 파일 jsx파일로 어떻게 변환시키나요?
stackoverflow에서
1
If your files are getting converted to .js and you want .jsx instead, that's because TypeScript is converting the TS code to actual JS code that injects the React nodes as needed. That is because of the
"jsx": "react"
Property you have on your file.
If you want to preserve the React syntax and have it output the extension as .jsx, do
"jsx": "preserve"
As explained in the handbook.
Share
Improve this answer
Follow
이렇게 하라고해서 tsconfig.json에서 preserve로 변경했는데 변경이 되지 않습니다,ㅠ