-
Notifications
You must be signed in to change notification settings - Fork 27.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next complied success even if typescript type check error #6466
Comments
May you try to use |
Crash on the first try. Even if this work I still need some babel plugin for the project and this example doesn't use babel |
Setting |
I will be fixing this as part of updating almost all of the examples |
@zeit/next-typescript uses @babel/plugin-transform-typescript which does not type check input.
If you want to see errors in your terminal then you can set up fork-ts-checker-webpack-plugin. Or if you completely want to prevent build, you can use awesome-typescript-loader or ts-loader |
I don't think this is a bug: babel-typescript only strip types but does not run type checking at all, so this is the intended behavior. As @azizhk said, if you want the build to fail, you'll need to use |
This has been implemented in the latest Next.js canary version. You can try it by installing |
Reverse issue: #7687 😁 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Examples bug report
Typescript type check error show on IDE but still complied success
Example name
custom-server-typescript
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
Throw error on type check error
Screenshots
System information
Additional context
The text was updated successfully, but these errors were encountered: