fix(css): .css?url support#15259
Conversation
|
|
Is there a reason this is supported? I can't quite think of a case where a user would use this, using plain |
I added it for compat for |
.css?url/.css?raw&url support.css?url support
|
In the last meeting, we discussed that we should add I removed the |
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI on
|
patak-cat
left a comment
There was a problem hiding this comment.
Nuxt fail seems unrelated. Awesome work @sapphi-red 💚
|
There appears to be a similar issue with SCSS. Say I have: import selectStyles from "somePackage/Select.scss?inline";
export const Theme = () => <style>{selectStyles}</style>;And that :root,
:host {
--select-icon: url("./chevron.svg");
}
.selectStyles {
background-image: var(--select-icon);
}Vite thinks that |
|
Hey @josephmarkus! Your comment in this merged PR will be quickly lost in the repo activity. Would you create a new issue with a minimal reproduction against the latest Vite so we can properly track the problem you are reporting? |
|
Was just filling in a bug report and whilst reproducing the error realised that my SCSS file imports another SCSS file, but if I target the end file directly, Vite resolves everything fine, so maybe not an issue 🤷♂️ |
Description
.css?urlnow returns a URL to transformed CSS.css?raw&urlnow returns a URL to raw CSSnote that.css?rawreturns a JS module (export default ".foo {}") but.css?raw&urlreturns a URL to CSS file (.foo {}).module.css?urlnow throws an error{ 'foo': 'foo_hash' }) without injecting the actual CSSfixes #2522
fixes #7842
fixes #13416
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).