f you are using JSX
-
[ Vite ] React-Vite Error : If you are using JSX, make sure to name the file with the .jsx or .tsx extension.Troubleshooting 2024. 2. 21. 00:11
Vite 로 개인 프로젝트를 진행하던 도중 [plugin:vite:import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension. 위와 같은 에러를 만났다. 처음엔 무엇이 문제인지 한참헤메다가 구글링을 통해 알아낸 것은 Vite는 기본적으로 .js 파일 내에서 JSX 구문 사용을 허용하지 않기 때문이다. https://stackoverflow.com/questions/74620427/how-to-configure-vite-to-all..