惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
Martin Fowler
Martin Fowler
Last Week in AI
Last Week in AI
罗磊的独立博客
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
V
Visual Studio Blog
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
博客园_首页
人人都是产品经理
人人都是产品经理
量子位
美团技术团队
The Cloudflare Blog
小众软件
小众软件
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
D
DataBreaches.Net
博客园 - Franky

tanscp

科学驾驭你的身体电量 (Body Battery) - tanscp Code Block Features Showcase 通俗易懂的解释什么是Agent - tanscp i18n in a Static Next.js Blog: Client-Side Toggle vs URL-Based Routing Multimedia Showcase: Video, Podcasts & Embeds Syntax Highlighting Mathematical Notation Visuals and Diagrams System Architecture 101 Syntax Highlighting Showcase 中文测试文章 Part 2: Routing Mastery 多语言测试并且要测试以下超长的标题看如何处理,如果太长的话要考虑方案: Amytis Digital Garden The Kitchen Sink: Comprehensive Feature Test Mac 菜单栏武装计划:10 款免费开源的宝藏 App 推荐 Markdown Features Test Nested Image Test Legacy Markdown Support Asynchronous JavaScript QuickSort: An Algorithmic Deep Dive README Index Post Deeper Notes 在一个被屏幕和算法全面包围的时代,我们正逐渐失去对“注意力”的主权 - tanscp AI 是如何识别一只猫的?——图解神经网络的秘密 - tanscp 什么是真正的自我?它真的存在吗? - tanscp AI洞察从你的笔记中读出了什么? - tanscp 我尝试空腹有氧一个月后 - tanscp ISSUE 026 | 数独事件 - tanscp ISSUE 025|你喜欢哪个版本的自己? - tanscp ISSUE 024|认知失调 - tanscp
Part 1: Getting Started with Next.js 15
John Hu · 2026-01-30 · via tanscp

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.

Setting Up with Bun

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.

The App Router

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:

  • Smaller client bundles — Server-only code never ships to the browser
  • Direct data access — Query databases or read files without an API layer
  • Streaming — The server can send HTML progressively as components render

Static Export

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.

What's Next

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.