stereobooster / react-snap

đŸ‘» Zero-configuration framework-agnostic static prerendering for SPAs
MIT License
5.04k stars 390 forks source link

Styles are breaking in mobile view #539

Open sandeepDevJs opened 2 years ago

sandeepDevJs commented 2 years ago

Bug Report

Current Behavior after finish crawling, I ran my app it worked fine but when I opened it in mobile phones, my website won't scroll, also distorting styles. I am using material UI

Expected behavior/code website is scrolling in laptop screens as well as styles are proper, but not in mobile phone screen

Possible Solution do you think this is because react-snap is not compatible with material ui

Additional context/Screenshots react-snap config

"reactSnap": {
    "fixWebpackChunksIssue": false,
    "puppeteerIgnoreHTTPSErrors": true,
    "inlineCss": true,
    "puppeteerArgs": [
      "--no-sandbox",
      "--disable-setuid-sandbox"
    ]
  }

I am using below prerenderedLodable

import React from "react";
import loadable from "@loadable/component";
import { PrerenderedComponent } from "react-prerendered-component";

const PrerenderedLodable = (dynamicImport) => {
    const LoadableComponent = loadable(dynamicImport);
    return React.memo((props) => (
        <PrerenderedComponent live={LoadableComponent.load()}>
            <LoadableComponent {...props} />
        </PrerenderedComponent>
    ));
};

export default PrerenderedLodable