giraud / bs-css

Statically typed DSL for writing css in reason.
ISC License
586 stars 101 forks source link

Allow bs-css-emotion to take a custom cache #245

Closed joshgodsiff closed 2 years ago

joshgodsiff commented 3 years ago

I have a use-case where we end up multiple instances of emotion loaded, with the result that the default internal caches conflict with each other when doing server-side rendering.

I'm currently hacking around this by creating new instances of emotion with non-conflicting caches using @emotion/css/create-instance, and then creating fresh custom bindings in Reason, but that's not ideal for many reasons.

It'd be awesome if the bs-css-emotion bindings could take a custom cache as a parameter somehow.

giraud commented 3 years ago

@joshgodsiff I'm not using cache and have no idea how that work, but a PR is welcome to solve that point.