stylex
stylex copied to clipboard
Referencing static assets
Description
How can i reference static assets within stylex definitions?
Example
I apologize if I overlooked this in the docs, but I didn't seem to find anything regarding injecting static files into style definitions with Stylex. Is there a recommended method for handling such scenarios?
Example:
import exampleImage from "./example.png"
const styles = stylex.create({
background: {
backgroundImage: `url(${exampleImage})`, // This is not allowed currently
},
});