vue-cli analyzing test files on build

Viewed 46

I am trying to add vue-cli to my already existing project (Vue 3 + TS + Webpack) The problem is that when I try to build (vue-cli-service build) I have issues in the test files.

For example

 error  in tests/unit/components/someComponent.spec.ts:123:25


 Property 'XXX' does not exist on type 'ComponentPublicInstance<{}, {}, {}, {}, {}, Record<string, any>, VNodeProps, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>'.

Is there a way so vue-cli doesn't try to validate the spec files or fix this?

1 Answers

Today I found the issue. In tsconfig.json I was including the files in /test/unit/**.ts. By removing it, it worked!

Related