跳到主要内容

基础

安装

pnpm create next-app

项目结构

  • src;
    • app: app router;
      • layout: 页面框架;
      • page: 页面文件;
      • loading: 加载 UI;
      • not-found: 404 UI;
      • error: 错误 UI;
      • global-error: 全局错误 UI;
      • route: 后端 API;
  • public: 静态文件;
  • next.config.js: next 配置文件;
  • .env: 环境变量;
  • next-env.d.ts: typescript 声明文件;