Fetches the contents of a CSS file as string.
The CSS file location.
The file content as a string.
You can use import.meta.resolve('./relative-path-to.css') inside components to resolve relative paths.
import.meta.resolve('./relative-path-to.css')
const css = await fetchCss('./style.css') Copy
const css = await fetchCss('./style.css')
If the response is not ok.
Fetches the contents of a CSS file as string.