Error: TypeScript emitted no output for

ERROR in ./src/index.tsx
Module build failed (from ./node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for C:\Users\tenrzzhang\Desktop\ten\reactapp\src\index.tsx.
    at makeSourceMapAndFinish (C:\Users\tenrzzhang\Desktop\ten\reactapp\node_modules\ts-loader\dist\index.js:53:18)
    at successLoader (C:\Users\tenrzzhang\Desktop\ten\reactapp\node_modules\ts-loader\dist\index.js:40:5)
    at Object.loader (C:\Users\tenrzzhang\Desktop\ten\reactapp\node_modules\ts-loader\dist\index.js:23:5)

解决:

修改tsconfig.json文件:

"noEmit": false  // 不生成输出文件

改为false,则执行build时不会报错

你可能感兴趣的:(web开发,reactjs)