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
Firstly, when importing css files as url, the returning url should not be the raw source code of that file, but the compiled code.
Secondly, when importing css files, currently the output data uri is data:undefined;base64,... .
For example:
// a.scss
a { &:hover { color: red; } }
// a.ts
import a from "./a.css?url"
console.log(a);
// a should be `a:hover { color: red; }`
// not `a { &:hover { color: red; } }`
Description
Currently , vite will replace
?url
to base64 url in production mode. If the resource is js or css file, it's better to return the url itself.Use case:
Suggested solution
?url
is not only for binary resources.Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: