framework icon indicating copy to clipboard operation
framework copied to clipboard

Handle `url()` in CSS files

Open aalin opened this issue 3 years ago • 0 comments

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

aalin avatar Feb 09 '23 05:02 aalin