配置 ts-loader 后 执行编译时报错 TS6142: Module './router' was resolved to 'C:\GitHubWorkspace\webpackPluginDemo\src\router.tsx', but '--jsx' is not set.
这时候 需要在tsconfig.json中添加一条
"jsx": "react"
{ "compilerOptions": { "jsx": "react", "target": "es5", "sourceMap": true }, "exclude": [ "node_modules" ] }