-
Notifications
You must be signed in to change notification settings - Fork 229
Typescript errors don't break build #33
Comments
@benjamingeorge That is the intended behaviour. Babel just strips all the ts-stuff out. That's why you need the manual typechecking as well. |
Sounds like a bad plan... Would you want to build your C#/C++ project without type checking? |
Does anyone know whether there is a way to break the build or display warnings in build time (webpack)? |
Good question @juanpicado, is the solution to use babel-loader with ts-loader? Or something else? Update: related: https://stackoverflow.com/questions/54675587/babel-typescript-doesnt-throw-errors-while-webpack-build . They recommend: https://github.com/Realytics/fork-ts-checker-webpack-plugin |
@frankandrobot I've been testing that plugin for a while and seems run the type checking in parallel and not in sync with the webpack process. Sometimes throws errors before webpck finish the hot reload build. It helps, but not the definitive solution. |
Here's another plugin that can achieve the same result: fork-ts-checker-webpack-plugin |
@gilamran: If you are a JS library maintainer, do you want to see your library fails to build during the migration? I don't think you get the point of what @johnknoop was saying.
This is just an additional feature that |
When using @babel/preset-typescript with babel-loader (webpack), a typescript error does not break the build. It compiles no matter what which renders typescript useless. When using just webpack and ts-loader I get the desired result of seeing errors in the terminal and a broken build when there is a typescript issue. Is this the intended behavior using typescript and babel in webpack ?
The text was updated successfully, but these errors were encountered: