The resolveId method on plugins which return a virtual module is called a second time with the previously resolved module id. It seems odd this would happen which made me question if this the intended behavior?
This came up while troubleshooting import errors using the plugin from lezer-parser/generator which uses virtual modules to load *.grammar.terms imports. I've opened an issue there (https://github.com/lezer-parser/generator/pull/21), but the question that this may be a bug in vitest was raised in that discussion.
Thank you for any assistance & guidance you can provide ❤️
Describe the bug
The
resolveId
method on plugins which return a virtual module is called a second time with the previously resolved module id. It seems odd this would happen which made me question if this the intended behavior?This came up while troubleshooting import errors using the plugin from lezer-parser/generator which uses virtual modules to load
*.grammar.terms
imports. I've opened an issue there (https://github.com/lezer-parser/generator/pull/21), but the question that this may be a bug in vitest was raised in that discussion.Thank you for any assistance & guidance you can provide ❤️
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-yzpqjh?file=README.md
System Info
Used Package Manager
npm
Validations