How to import jsx file in tsx,

36 Views Asked by At

enter image description here

Red line is showing at the time of importing jsx file into tsx file.

to solve this issue just add, "allowJs": true, in tsconfig.json file ,

tsconfig.json

  "compilerOptions": {
    "allowJs": true,
  },

I was trying to import app.jsx file into main.tsx

1

There are 1 best solutions below

1
Anurag Affection On

 "compilerOptions": {
    "allowJs": true,
  },

Now, my answer is cleared just adding, ```compilerOptions": { "allowJs": true, },

in tsconfig.json