Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexweberk/cloudflare-nextjs-static
https://github.com/alexweberk/cloudflare-nextjs-static
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/alexweberk/cloudflare-nextjs-static
- Owner: alexweberk
- Created: 2024-11-23T05:13:32.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-23T05:24:28.000Z (2 months ago)
- Last Synced: 2024-12-14T20:44:34.232Z (about 1 month ago)
- Language: TypeScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Next.js Static Export
Next.js enables starting as a static site or Single-Page Application (SPA), then later optionally upgrading to use features that require a server.
When running `next build`, Next.js generates an HTML file per route. By breaking a strict SPA into individual HTML files, Next.js can avoid loading unnecessary JavaScript code on the client-side, reducing the bundle size and enabling faster page loads.
Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports
## Deploy your own
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example) or preview live with [StackBlitz](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-static-export)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-static-export)
## How to use
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
```bash
npx create-next-app --example with-static-export with-static-export-app
``````bash
yarn create next-app --example with-static-export with-static-export-app
``````bash
pnpm create next-app --example with-static-export with-static-export-app
```