ts-loader: Typescript syntax errors in happyPackMode with forked checker
I have cloned the examples directory from this repo and inside the happyPack example added the following line:
const array = [{} {}];
(missing comma)
to the bottom of the fileWithoutError.ts
file and corrected the error in fileWithError.ts
file
and then ran webpack
.
No errors were reported. When I try to use incorrect type errors indeed are reported, but I am not sure this is enough…
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 23 (20 by maintainers)
I think the issue is here: https://github.com/TypeStrong/ts-loader/blob/master/src/index.ts#L214
In
happyPackMode
we cannot register transpile errors with webpack and so this info is lost. BTW the same issue would presumably apply if using thread-loader instead of happypack. Same principle; ts-loader cannot register errors with webpack.There’s nothing that we can do from a ts-loader perspective here.
If you could look at this that would be awesome!