設定
Next.js 讓您可以根據特定需求自訂您的專案。這包含與 TypeScript、ESlint 等的整合,以及像是絕對路徑導入和環境變數等內部設定選項。
TypeScript
Next.js provides a TypeScript-first development experience for building your React application.
ESLint
Next.js reports ESLint errors and warnings during builds by default. Learn how to opt-out of this behavior here.
Environment Variables
Learn to add and access environment variables in your Next.js application.
Absolute Imports and Module Path Aliases
Configure module path aliases that allow you to remap certain import paths.
src Directory
Save pages under the `src` directory as an alternative to the root `pages` directory.
MDX
Learn how to configure MDX to write JSX in your markdown files.
AMP
With minimal config, and without leaving React, you can start adding AMP and improve the performance and speed of your pages.
Babel
Extend the babel preset added by Next.js with your own configs.
PostCSS
Extend the PostCSS config and plugins added by Next.js with your own.
Custom Server
Start a Next.js app programmatically using a custom server.
Draft Mode
Next.js has draft mode to toggle between static and dynamic pages. You can learn how it works with Pages Router.
Error Handling
Handle errors in your Next.js app.
Preview Mode
Next.js has the preview mode for statically generated pages. You can learn how it works here.
Content Security Policy
Learn how to set a Content Security Policy (CSP) for your Next.js application.
Debugging
Learn how to debug your Next.js application with VS Code or Chrome DevTools.
這個頁面有幫助嗎?