











Next.js 15 brings powerful new features to the table. In this part, we explore the foundation: the App Router, Bun as a package manager, and static export for deployment.
Bun is a fast JavaScript runtime and package manager that pairs well with Next.js 15. Creating a new project takes a single command:
Bun's install speed is noticeably faster than npm or yarn, and its built-in bundler means fewer dependencies in your toolchain.
Next.js 15 uses the App Router by default, replacing the legacy Pages Router. The key difference is that every component is a Server Component unless you explicitly opt in to client-side rendering with "use client".
Server Components unlock several benefits:
For sites that don't need a running server (blogs, documentation, landing pages), Next.js supports full static export:
Running bun run build with this configuration generates a out/ directory containing plain HTML, CSS, and JavaScript files. You can deploy this to any static hosting service — GitHub Pages, Netlify, Cloudflare Pages, or an S3 bucket.
In Part 2, we'll explore the file-based routing system in depth: dynamic routes, route groups, layouts, and how Next.js turns your folder structure into a fully-featured application.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。