reactesse-edge-template
reactesse-edge-template copied to clipboard
Reactesse Edge
React + Vite + Edge Side Rendering template based on @antfu's Vitesse with Vitedge.
Features
-
⚔️ Edge-side rendering in Cloudflare Workers via Vitedge, with edge cache and HTTP/2 server push
-
🗂 File based routing
-
🎨 Windi CSS - on-demand Tailwind CSS with speed
-
🌍 I18n ready
-
🦾 TypeScript, of course
-
☁️ Deploy on Cloudflare Workers, minimal setup
Pre-packed
UI Frameworks
- Windi CSS (On-demand TailwindCSS) - lighter and faster, with a bundle additional features!
- Windi CSS Typography - similar to Tailwind CSS Typography but for Windi CSS
Plugins
vite-plugin-pages- file system based routingvite-plugin-windicss- WindiCSS supportvite-plugin-mdx- Markdown as components / components in Markdownremark-prism- Prism for syntax highlightingprism-theme-vars- customizable Prism.js theme using CSS variablesreact-i18next- Internationalizationreact-helmet-async- manipulate document head reactively
Dev tools
- Vitedge - Edge-side rendering
- Miniflare - Preview your app in a worker environment locally
- Wrangler - Deploy to Cloudflare Workers
- TypeScript
- VS Code Extensions
Try it now!
GitHub Template
Create a repo from this template on GitHub.
Clone to local
If you prefer to do it manually with the cleaner git history
npx degit frandiox/reactesse-edge-template my-reactesse-app
cd my-reactesse-app
npm i
Checklist
When you use this template, try follow the checklist to update your info properly
- [ ] Add a
namefield inpackage.json - [ ] Change the author name in
LICENSE - [ ] Change the favicon in
public - [ ] Remove the
.githubfolder which contains the funding info - [ ] Clean up the READMEs and remove routes
And, enjoy :)
Usage
Development
Just run and visit http://localhost:3333
npm run dev # SSR development
npm run dev:spa # SPA without SSR
Build
To build the App, run
npm run build
And you will see the generated files in dist.
Deploy on Cloudflare Workers
- Create your Cloudflare account.
- Install Wrangler CLI.
- Modify the
account_idin wrangler.toml. Then:
npm run preview # Simulate Worker environment locally
npm run deploy