-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing from partial PostCSS files is ignored in Server Side Rendering #80
Comments
@michalkvasnicak , @top1st , please read my issue and guide me. thanks. |
Hi, a couple of tracks to research:
|
@amerllica I quickly looked at your sample repo, why don't you use Webpack for compiling the server-side as well? That would solve your issue and simplify a bit your build. |
Hi dear @pascalduez , thanks a lot for your quick answer, I've searched about it and have found using 1st: using 2nd: using |
@amerllica if you are using webpack, then you don't need this plugin at all, you only need |
@amerllica here is an example how would your webpack config look like https://github.com/michalkvasnicak/spust/blob/master/packages/spust/src/helpers/createWebpackLoaders.js |
Hello I use postcss with sugarss parser (.sss files) in project
and postcss.parse.js :
I'm sure this should help |
Actullay this plugin is awesome, but if
className
s exist in partial PostCSS file, all of them know asundefined
react component example;
Main PostCSS file:
Partial PostCSS file:
Exported
DOM
:How I can settle this issue? shall this plugin have some configs or .babelrc file must have?!
For better explain I create a tiny Github project that uses this plug-in for server side css transform, its link is SSR with CSS Modules.
When page renders as server side you can see the
HomePage
word is gray but when you click on above navigation and go toabout us
page and return to home page without refresh,HomePage
is now red, a refresh makeHomePage
word gray again. it means server side rendering with partial CSS Source creation cause to wipeclassName
but when you navigate between links CSS is created, now delete partials and write allclassName
s insidestyles.pcss
file, and runnpm run build prod
then runnpm run ssr
you see everything is ok, It prove my words, that partialing CSS Sources with Server Side Rendering cause to this issu.Please some one guide me.
The text was updated successfully, but these errors were encountered: