tsx
. 为此,我紧随其后
https://github.com/TypeStrong/ts-loader/tree/master/examples/react-hot-boilerplate
我又加了一句
use: [
{ loader: 'ts-loader', options: { happyPackMode: true } }
],
所以我开始出现奇怪的编译错误:
./client/main.tsx//<-我的入口点出错
模块生成失败
(from./node_modules/ts loader/index.js):类型错误:无法读取
未定义的属性“getEmitOutput”
在Object.getEmitOutput(………/node_modules/ts loader/dist/instances.js:190:41)
{
"compilerOptions": {
"allowJs": true,
"checkJs": false,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"target": "es5",
"jsx": "react",
"lib": [
"es2015",
"es2016",
"es2017",
"dom",
"es7"
],
"downlevelIteration": true,
"typeRoots": [
"./@types"
],
"sourceMap": true,
"noUnusedLocals": true,
"noUnusedParameters": true
},
"include": [
"./client/**/*",
"./@types/**/*"
],
"exclude": [
".svn"
]
}