-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: prerender plugin #86
Conversation
b087058
to
5cfd8c5
Compare
8468c1a
to
1d7648e
Compare
166aeb0
to
926e378
Compare
"preact": "^10.19.2", | ||
"preact-iso": "^2.3.2", | ||
"preact-render-to-string": "^6.3.1", | ||
"prettier": "^2.2.1", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.77.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done just for types -- newer versions of Vite (conveniently) expose Rollup's types (import type { Rollup } from 'vite'
) so we can drop this in the future.
16b3136
to
9d709ab
Compare
96dee28
to
e930e5a
Compare
d3740ce
to
be9a099
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in JoviDeCroock/blog-portfolio#60
Seems to work well, one of my "gripes" is that all the meta
/... is rendered on a single line which might not be easy to read and validate for people.
We might want to write something up about this where wmr
migration has become easier and so has SSG with our preset
Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
Largely mimics WMR's setup, as that was pretty slick, with a few minor changes:
document.body
prerender()
function in any script listed in input HTML doc, doesn't require a certain placementPatches for Vite's preloader were all that was needed to get the bundles working in Node. I've asked if they'd be willing to implement this upstream, but we'll see.