Closed charminghiker closed 3 years ago
need add typeRoots
typeRoots
"compilerOptions": { "target": "es5", "module": "commonjs", "lib": [ "dom", "es2015", "es2016", "es2017" ], "allowJs": true, "jsx": "react", "jsxFactory": "React.createElement", "sourceMap": true, "outDir": "./dist", "strict": true , "esModuleInterop": true, "typeRoots": [ "node_modules/@types" ] }, "exclude": [ "node_modules", "dist" ] }``
The @types folder from node_modules is the default option of typeRoots, but you can always customize as the tsconfig is open for changes when you use the template.
@types
need add
typeRoots