silverwolf-x's picture
|
download
raw
1.23 kB
# 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 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
```

Xet Storage Details

Size:
1.23 kB
·
Xet hash:
a51b5a6f65a1002481c4fe14d7641ca33313b2bfbea055cfe44d456011238a35

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.