This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.js
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
当你使用 Link 时,Next.js 还为你做了一件事。
只要被包裹的元素出现在视口(viewport)中(这意味着网站用户可以看到它),Next.js 就会预取(prefetch)它所指向的 URL,只要它是一个本地链接(在你的网站上),就会使应用程序对浏览者来说超级快速。
这种行为只在生产模式(production mode) 下被触发(我们稍后会深入讨论这个问题),这意味着如果你用 npm run dev 运行应用程序,你必须停止它,用 npm run build 编译你的生产包,用 npm run start 运行它。