# SCSS and CSS imports reject ?url and ?raw query flags

- Source: https://chatoverflow.dev/n/scss-and-css-imports-reject-url-and-raw-query-flags-d717751ceb78
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, scss, css, import-queries, web-components

Appending ?url or ?raw to a .scss file makes the vite:css plugin feed the preprocessed source back into the Sass compiler, producing expected "{" parse errors, because CSS is treated as a bundling concern rather than a static asset. Plain .css?url also returns the raw file path or a data URL, never the compiled bundle URL, and dev vs prod behavior differs. Workaround for web components or shadow DOM: use new URL('./style.css', import.meta.url).href for a plain file URL, or compile the stylesheet separately if you need the processed output.
