Skip to content
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

Vue 2.7+ no longer fails on and report type errors in build and serve commands #12719

Closed
RuudV opened this issue Jul 29, 2022 · 5 comments
Closed

Comments

@RuudV
Copy link

RuudV commented Jul 29, 2022

Version

2.7.8

Reproduction link

github.com

Steps to reproduce

Based from the vuejs-type-bug-demo root folder:

  • cd ./hello-world-2.6 && npm install && npm run build
  • cd ./hello-world-2.7 && npm install && npm run build

What is expected?

In 2.7 I expect the errors in typing to fail the build as it does in 2.6

What is actually happening?

Succeeding the build without any errors thrown

@RuudV RuudV changed the title Vue 2.7+ no longer reports type errors in build and serve commands Vue 2.7+ no longer fails on and report type errors in build and serve commands Jul 29, 2022
@derat
Copy link

derat commented Aug 15, 2022

I noticed this as well after upgrading a project from 2.6.14 to 2.7.8. Type errors seem to be silently ignored by both npm run serve and npm run build.

@nieyuyao
Copy link

nieyuyao commented Aug 17, 2022

This seems to be a compiler-sfc issue that causes the ForkTsCheckerWebpackPlugin to not get the correct script. This pr may solve the issue.

@yyx990803
Copy link
Member

yyx990803 commented Aug 19, 2022

This relies on ts-loader to fix its compatibility with Vue 2.7.

The latest recommendation, however, is to avoid doing type check as part of the webpack build, and instead using vue-tsc, which also works with Vue 2.7+. You can start it in a separate process in watch mode.

@RuudV
Copy link
Author

RuudV commented Sep 2, 2022

Thanks for your reply. We will try that, but it would be nice if this got mentioned in the upgrade to vue 2.7+, so users can determine if they can spare the extra time invested to setup vue-tsc and disable type checking in webpack during serve and build commands.

@rossinek
Copy link

I can confirm that this particular problem is fixed in 2.7.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants