from
id
is always cleaned before being passed to the PostCSS plugins
#7822
Labels
from
id
is always cleaned before being passed to the PostCSS plugins
#7822
Describe the bug
Nowadays with
[email protected]
+, we always usecleanUrl(id)
which removes extra query parameter information potentially added in the Vite/rollup build steps when we pass the file off to the PostCSS plugins. This behavior was changed in #7173 (specifically).id
)cleanUrl(id)
)/Users/eric/Documents/github/element/hydrogen-web/src/platform/web/ui/css/themes/element/theme.css?variant=dark&dark=true
/Users/eric/Documents/github/element/hydrogen-web/src/platform/web/ui/css/themes/element/theme.css
Before
[email protected]
, we would directly pass theid
to the PostCSSfrom
field which plugins can access viaroot.source.input.from
. This old behavior was used in one of our custom PostCSS plugins to filter out certain files based on those?variant=dark&dark=true
query parameters.I'm wondering if this was a totally intentional change and we need to refactor our PostCSS plugin to work around this? Or if Vite should be adjusted to accommodate again?
Spawned from element-hq/hydrogen-web#722
Reproduction
https://stackblitz.com/edit/vitejs-vite-bswz32?file=my-postcss-plugin.js&terminal=dev
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: