Site with some issues and improvements

That warning seems to be from the Link component.

Can I move modified core to packages directory? or Does this mean we can’t use material-ui with Frontity on the Vercel?

You have to use something like https://github.com/ds300/patch-package from now.

'document' is not defined. It shows this error on client

Urgent: frontity.style is no longer in index.ts because of your updates, so where to add this:

frontity.style = <style amp-custom>${emotion.css}</style> <style id="jss-server-side">${materialCss}</style> ;

@furrysmile2 I would just copy the file again (https://github.com/frontity/frontity/blob/dev/packages/core/src/server/index.tsx) and then add the style to the frontity object because it gets sent to the template.

As you can see, the frontity.style prop still exists in the template file: https://github.com/frontity/frontity/blob/dev/packages/core/src/server/templates/html.ts#L16

I might be a bit late into this but I’m working on implementing Material UI.
I believe emotion.css also moved from index.tsx so curious if that’s covered somewhere else and we can just put: ${materialCss}?

yes we can

Thanks. I got it actually working now and it’s working smoothly. Also added serverGenerateClassName to clean things up a bit.

this issue with correctly rendering material-ui in theme is solved with package ?

Yes just edit and run this https://github.com/ds300/patch-package

2 Likes

Just following up on this as there has been changes with the recent patch from core
@frontity/core”: “^1.11.0”,

Is there an OOTB solution for Material UI SSR support now?

By any chance, you can provide a guide on how to do this since https://github.com/frontity/frontity/blob/dev/packages/core/src/server/index.tsx has changed?

@cristianbote has made a CodeSanbox explaining how to do this in this other thread: Integrate Material-UI server side rendered - #6 by cristianbote

Let’s continue the discussion there instead :slightly_smiling_face: