A
A
Anubis2018-07-21 12:06:05
typescript
Anubis, 2018-07-21 12:06:05

How to prevent TS compilation in Webpack when there are errors?

I use tslint-loader in combination with awesome-typescript-loader (already tried to change to ts-loader - they behave the same). tslint-loader configured so that if there are errors caught by the linter, the bundle is not built:

emitErrors: true,
failOnHint: true

This is what I need. But Webpack stubbornly ignores the errors of the TS compiler itself. It just displays and builds the bundle as if nothing had happened:
5b52f6790ebda132833566.jpeg
I need the compilation to break in the same way as in the above case of finding non-compliance with the rules by the linter. And now the project is going even if a call to a non-existent function is added to the code.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question