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
Astro v4.0.6
Node v18.18.0
System Linux (x64)
Package Manager unknown
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
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.
What's the expected result?
The image paths transformations should happen regardless of whether they are defined in shared or non-shared CSS modules.
If I made Vite's postcss plugin use OnceExit instead, it also doesn't work as Postcss doesn't seem to use the new rewritten URLs for some reason. Plus, postcss-modules doesn't provide the original "importer" path of the composed file for Vite to be able to resolve path relative to it.
So I'm not sure if this is fixable at the moment. I'd suggest perhaps making an issue in Vite about this so we could track it, but I guess ideally madyankin/postcss-modules#149 could be resolved and have the composes transformed in Once instead.
Also closing this for now as it's out of scope of Astro to fix.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
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.
What's the expected result?
The image paths transformations should happen regardless of whether they are defined in shared or non-shared CSS modules.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-dzmctt-mda7ss?file=src%2Fcomponents%2Fa.module.css
Participation
The text was updated successfully, but these errors were encountered: