Currently, I am in the process of integrating Typescript into my existing React, Webpack, and Babel project. I aim to include support for file extensions such as [.js, .ts, .tsx]
as part of my gradual transition to Typescript.
I have made some progress, but I am encountering difficulties resolving this specific error:
https://i.stack.imgur.com/fosZF.png
Furthermore, I am unsure whether it is necessary to retain Babel or if I can remove it once this setup is complete.
This is what my tsconfig.json
currently looks like:
{
"compilerOptions": {
"target": "es5",
"lib": ["es6", "dom", "esnext.asynciterable", "es2015"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
// "noEmit": true,
"strictNullChecks": true,
// "noImplicitAny": false,
"jsx": "preserve"
},
"include": ["src"],
"exclude": ["node_modules", "build", "scripts", "jest"]
}
You can find my webpack.conf.js
here: https://gist.github.com/Martinnord/981769791c3e5e3a261af459b81f2733
I would greatly appreciate any assistance as I am currently facing obstacles in this process.
Thank you!