上海做企业网站,邢台建设网站,wordpress站点标题美化,旅游官网cra 配置路径别名 后#xff0c;出现 ts 报错#xff1a;找不到模块“/App”或其相应的类型声明。ts(2307)
然后可以在 tsconfig.json 中配置 baseUrl 和 paths #xff1a;
{compilerOptions: {target: es5,lib: [ 后出现 ts 报错找不到模块“/App”或其相应的类型声明。ts(2307)
然后可以在 tsconfig.json 中配置 baseUrl 和 paths
{compilerOptions: {target: es5,lib: [dom,dom.iterable,esnext],allowJs: true,skipLibCheck: true,esModuleInterop: true,allowSyntheticDefaultImports: true,strict: true,forceConsistentCasingInFileNames: true,noFallthroughCasesInSwitch: true,module: esnext,moduleResolution: node,resolveJsonModule: true,isolatedModules: true,noEmit: true,jsx: react-jsx,baseUrl: .,paths: {/*: [src/*]}},include: [src]
}