This is a working example of a SSG with partial(selective) hydration[⚡🧩💦].
The server and client render should not be 1:1. Don't render buttons on the server that require JS to work. Don't ship code to the client that simply repeats what the server has already done
- https://markus.oberlehner.net/blog/building-partially-hydrated-progressively-enhanced-static-websites-with-isomorphic-preact-and-eleventy/#demo-and-full-code
- https://developers.google.com/web/updates/2019/02/rendering-on-the-web
- Lazy evaluate hydrated components with intersection observer
- Prefetch templates based on hover.
- Portal Based router using TurboLink-esq appraoch (super ugly right now)
- Host on render.com and get free brotli compression
- Build a unique component chunk and prerender each page with
- ServiceWorkers https://developers.google.com/web/updates/2019/02/rendering-on-the-web
- Better folder structure with to prerender many apps (monorepo?)
- Better AutoHydration Developer Experience
- Full deno bundling.
- SEO mobile/Desktop SSR https://developers.google.com/web/updates/2019/02/rendering-on-the-web#trisomorphic
- Replace Turbolinks with https://web.dev/hands-on-portals/
- API for selective SSG or SSR https://nextjs.org/blog/next-9-3
node v10+ (until deno has a proper bundler) deno: (brew install deno)
npm i && deno --allow-run --allow-read src/main.ts
npm run build
deno --allow-write --allow-read --importmap=import_map.json ./src/prerender.ts
deno --allow-net --allow-read --importmap=import_map.json src/server/serve.ts"
deno --allow-write --allow-read --importmap=import_map.json prerender.ts && npm run build && deno --allow-net --allow-read --importmap=import_map.json server.ts
- @developit
To bundle client side: (must be on master as of April 7th) ../deno/target/debug/deno bundle --importmap=import_map.json client/app.js dist/bundle.js
- deno bundler still isn't ready for primetime.
- until then we'll use microbundle to bundle our front end.
- Minify html
- Purgecss
- device testing with refreshing?
- Make a SSR Framework like fusion using oak
- figure out DI by looking into fusion core.
- Have a monorepo command line like nx
- What is http3?