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
Background image path not transformed when used in a shared CSS module #15410
I am using Vite indirectly through Astro. I have a shared CSS module and compose its declarations in other CSS modules. When I link to a background image in this shared module, its URL remains unchanged in the output CSS, and doesn’t work. When I move the same background rule to a non-shared CSS module, everything works as expected: the URL of the background image is transformed to link to its actual location.
By default the StackBlitz shows the working version. To see the bug, comment out the background definition in a.module.css, and uncomment it in shared.module.css. You might need to restart Astro in the terminal by focusing it, pressing Ctrl+C, and running astro dev.
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
bolt-new-by-stackblitz commentedon Dec 22, 2023