-
Notifications
You must be signed in to change notification settings - Fork 179
When use an empty xxx.d.ts,at-loader will throw an exception #320
Comments
I can't speak to the latest beta version, but prior versions add an "opinion" that generated empty files are in some way a bug whereas the tsc compiler does not. I don't know if this is related. I would suggest that in the upcoming version, such added behavior not be included. If tsc doesn't consider it an error, why should a loader. Our older gulp builds used to filter out interface only files (.I.js) because they would be empty. Such an option for empty output files would be welcome, since we have little other control, to my knowledge, of file handling in a manner similar to a gulp pipeline. |
Some error info:
The empty file is created by myself. It's not a common case. |
set content
to the empty xx.d.ts, will shy away this problem. |
I am also encountering this error:
with the following package versions:
Any ideas why this is happening? |
@claudiuconstantin some d.ts is empty will throw the messages. |
It seems to be a bug in TypeScript |
I've finally understood what is going on. Please confirm my thoughts. Repro case: index.ts:
This will be transpiled by typescript into: index.js:
Then webpack tries to load I'll make a hack in the loader to emit empty modules in such cases, but actually, this should never happen, because |
I have the same issue please help me(urgent) |
Maybe it is typescript bug.
The text was updated successfully, but these errors were encountered: