You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Import attributes are not passed to resolveId if dynamic import regex matches #21394
I am authoring a plugin for constructable CSS modules but I've encountered this problem with sources that include dynamic imports (even when part of a comment). In this case, Vite doesn't pass the attributes to the resolveId hook.
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.
Activity
edoardocavazza commentedon Jan 13, 2026
I think I found the "culprit":
vite/packages/vite/src/node/plugins/importAnalysisBuild.ts
Line 338 in a3de203
I'm not sure why the attributes are being removed here.