Open
Description
Related plugins
Describe the bug
When typescript module
is nodenext
, vue-tsc
produces this error coming from this plugin:
vitest.config.ts:6:5 - error TS2349: This expression is not callable.
Type 'typeof import("node_modules/@vitejs/plugin-vue/dist/index")' has no call signatures.
6 vuePlugin(),
~~~~~~~~~
Changing module
to preserve
works, but is undesirable in Node.js projects. Changing module
to esnext
also works but resolveJsonModule
can not be used with it so is also not desirable.
Using official tsc
instead of vue-tsc
also works, but that breaks the typechecking of all .vue
files, so also not desirable.
This might be a bug in vue-tsc
, if so let me know and I will file it there.
Reproduction
https://github.com/silverwind/vue-plugin-not-callable
Steps to reproduce
Run npm i && npx tsc
System Info
"@vitejs/plugin-vue": "5.2.1",
"typescript": "5.6.3",
"vue-tsc": "2.1.10"
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.