-
|
Hi, I'm trying to make my transformer. Expected behavior: I was waiting for typing errors or other diagnostic messages to be shown during the webpack build process, since transformer works fine when compiled via tsc. Question: Tell me, maybe this is an unsolvable problem or the problem needs to be solved in some other way? I will be grateful for the direction. I made a small example to reproduce: https://github.com/Isqanderm/onion-transformer/tree/main/examples/webpack P.S.: transformer itself works perfectly. This approach opens up vast horizons for imagination. Thanks for that. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hi Aleksandr! If you're using If you use another loader, check it if has a compiler option (it should), and you can point it to tsp. Hope that helps! |
Beta Was this translation helpful? Give feedback.


Ah, sorry, I misunderstood. I missed that you were using the
addDiagnosticfeature to add custom errors.Unfortunately, that's a part of a known issue. While the feature works correctly, it was built to work with the standard
emitFilesAndReportErrors(iirc) function which tsc and most others that use the compiler API use for emit.Some libraries do some custom magic and use other means, which means our diagnostics utils aren't able to inject into the arrays produced by those methods.
The upcoming new major version of tsp will have a a more robust and higher insertion point to ensure that we can tap into diagnostics no matter where they're created.
In the mean time, it may be possible to w…