-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 typechecking is incorrect when setting skipTypeCheck: false for @nx/vite:build executor #20242
Comments
This issue has been automatically marked as stale because it hasn't had any activity for 6 months. |
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> Typechecking of Vue Projects with Vite is not functioning correctly ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Typechecking of Vue projects should type check the .vue files and not error in TS files importing .vue files ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #20242 (cherry picked from commit 8cf69c4)
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Running
nx run <vue-project-name>:build
on brand new vue project with"skipTypeCheck": false
produces typescript errors. It doesn't catch typescript errors in*.vue
files either.Expected Behavior
nx run <vue-project-name>:build
with"skipTypeCheck": false
should produce no errors on brand new vue project and should typecheck not only*.ts
files, but*.vue
files as well.GitHub Repo
https://github.com/domantas-simplex/nx-vue-typecheck-monorepo
Steps to Reproduce
git clone [email protected]:domantas-simplex/nx-vue-typecheck-monorepo.git && cd nx-vue-typecheck-monorepo && npm i && npx nx run typechecking-test:build
or
git clone [email protected]:domantas-simplex/nx-vue-typecheck-monorepo.git
cd nx-vue-typecheck-monorepo
npm i
npx nx run typechecking-test:build
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
Looks like typechecking is performed with usual
typescript
instead ofvue-tsc
.nx/packages/vite/src/utils/executor-utils.ts
Line 16 in 96043fb
nx/packages/js/src/utils/typescript/run-type-check.ts
Lines 81 to 85 in 96043fb
nx/packages/js/src/utils/typescript/run-type-check.ts
Lines 119 to 120 in 96043fb
Vue projects should be typechecked with
vue-tsc
- https://www.npmjs.com/package/vue-tscExample of typechecking script: https://github.com/vuejs/create-vue-templates/blob/371a1995e07a71328c3163917479a9e30d9ba1a4/typescript/package.json#L10
The text was updated successfully, but these errors were encountered: