Closed magnusriga closed 5 years ago
@hupe1980 I believe addressing this issue would require a way to import a custom stylesProvider props object. Gatsby inlines the configuration at some point in its build step. What do you think?
@hupe1980 I believe addressing this issue would require a way to import a custom stylesProvider props object. Gatsby inlines the configuration at some point in its build step. What do you think?
@oliviertassinari Thanks for checking in. I created a PR I think will solve it. I also added information to the README for clarity.
PS: I tried it on my end and it seems to work.
@hupe1980 I believe addressing this issue would require a way to import a custom stylesProvider props object. Gatsby inlines the configuration at some point in its build step. What do you think?
@oliviertassinari We would definitely cover all cases: JSS plugins, insertionPoint: [Comment | HTMLElement] and createGenerateClassName
@magnusriga What do you think?
Thanks for reviewing @hupe1980 . We are exchanging some thoughts over in the PR section.
Question: I used to use my own
StylesProvider
ingatsby-browser.js
, as suggested on the material-ui website:Now, with this plugin, if I still want to use the
jss-insertion-point
approach, where do I place thecreate()
function?PS, I tried the below in the plugin config, following the structure of the
material-ui/styles
source code. It does not work, as I would need access todocument
to add the rightinsertionPoint
(it should not bestring
, but rather a DOM node).