Skip to content
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

close #262 by using react-snap to prerender pages #271

Closed
wants to merge 1 commit into from

Conversation

hamirmahal
Copy link
Member

This pull request attempts to close #262.

At the time of this writing, it adds minimal CSS needed for the page to render by adding

"reactSnap": {
    "inlineCss": true
},

to package.json, adds the react-snap dependency and postbuild script for it in package.json, and updates src/index.js to attach event listeners to already created HTML if react-snap already pre-rendered HTML contents or rendered them on the server.

@vercel
Copy link

vercel bot commented Dec 11, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/amilajack/tide/909jue3h0
✅ Preview: Failed

@hamirmahal hamirmahal self-assigned this Dec 11, 2020
@hamirmahal
Copy link
Member Author

error at / TypeError: Cannot read property 'ok' of null 99 at isOk (/home/runner/work/tide/tide/node_modules/minimalcss/src/run.js:13:35)

This is the message that occurs on the failed run that's not Vercel.

I researched it a bit and the owner of react-snap says "This is not an error of minimalcss. This is an issue in react-snap (there is no try-catch around minimalcss https://github.com/stereobooster/react-snap/pull/263/files#diff-168726dbe96b3ce427e7fedce31bb0bcR261). Nothing to fix in minimalcss" on an issue page open in minimalcss for the same error message we received.

A more recent issue with the same error message says, "Disabling the website's service worker works!"

Is that something we want to do?

@hamirmahal hamirmahal added the question Further information is requested label Dec 11, 2020
@hamirmahal hamirmahal closed this May 16, 2021
@hamirmahal hamirmahal deleted the feat/react-snap branch July 28, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

optimization: use react-snap to prerender pages
1 participant