2

Not sure how to handle referencing binary files in "CSS in JS" solutions. Webpack does this by default by referencing everything as absolute. So I'm wondering if there's a solution outside of Webpack?

chriz
  • 1,826
  • 2
  • 24
  • 28

2 Answers2

0

solution outside of Webpack?

Did you mean stand along library?

You can try this one: cssobj

James Yang
  • 1,306
  • 4
  • 15
  • 25
  • more like updating the static reference (jpg|gif|png|svg) with absolute url. I think its more of a build tool's job by now. – chriz Nov 01 '16 at 20:17
0

You can create a JS constant with an absolute path and use it as a prefix for your path to an image and co.

Oleg Isonen
  • 1,463
  • 10
  • 10