framework
framework copied to clipboard
Handle `url()` in CSS files
The CSS transformer will take:
foo { background-image: url("foobar.png"); }
and turn it into:
.demo_foo\?uc88-KVY { background-image: url("LMXcDq"); }
and also return this dependencies-array:
[
{
type: "url",
url: "foobar.png",
placeholder: "LMXcDq",
loc: {
filePath: "demo.rb",
start: {
line: 3,
column: 25
},
end: {
line: 3,
column: 34
}
}
}
]
So, somehow images need to be loaded and the placeholders should be replaced with their paths