-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Environment
typescript 5.8.3
typescript-plugin-css-modules 5.1.0
vue 3.5.17
@vitejs/plugin-vue 6.0.0
VS Code 1.102.1
Volar extension v3.0.3 (built-in)
OS Windows 11
tsconfig (reduced)
Steps to reproduce
npm create vue@latest
(or any fresh Vue 3 + TS + Volar project)npm i -D typescript-plugin-css-modules
- Add the plugin to
compilerOptions.plugins
as above - Open VS Code → wait until TS Server restarts
Expected
• SFC imports still resolve, e.g.
import Home from './Home.vue'
type checks without errors, while CSS-module types are available.
Actual
• Types for style modules works correctly
but
• Every import X from './*.vue'
shows TS2307: Cannot find module ‘…’
If I remove the plugin line, the errors disappear immediately.
Minimal repro repo
Additional context / hypothesis
It looks as if the plugin overrides resolveModuleNames
and doesn’t fall back to the default resolver for unknown extensions (.vue
). Volar relies on .vue
being resolvable, so type acquisition breaks.
Is there a way to let the plugin coexist with the default resolver (or to whitelist .vue
)?
Happy to test nightly builds or provide more logs if needed.
Thanks! 🙏
Metadata
Metadata
Assignees
Labels
No labels