JS/TS intellisense not working

Just added typescript support to huge JS project while upgrading to webpack 5. Now everything runs fine, compiles fine and work as expected except for the vscode intellisense. If I'm inside a js file and trying to import a .tsx comonent the ctrl+space auto complete only shows .js components and not .tsx ones same happens otherway were .js components are not auto complete in .tsx files. I can manually go up and import them it works great. Types and everything work as exepcted. Heres the tsconfig. Babel is also used if that information might affect this.
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": false,
"jsx": "react-jsx",
"incremental": true,
"outDir": "dist",
},
"include": [
"frontend/**/*.ts",
"frontend/**/*.tsx"
],
"exclude": [
"node_modules",
"dist",
]
}
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": false,
"jsx": "react-jsx",
"incremental": true,
"outDir": "dist",
},
"include": [
"frontend/**/*.ts",
"frontend/**/*.tsx"
],
"exclude": [
"node_modules",
"dist",
]
}
1 Reply
sen.py
sen.py2y ago
If anyone in the future has this with js + ts features. This happened because I forgot to add the .js files inside "includes"
Want results from more Discord servers?
Add your server