项目包文件 package.json

package.json 文件包含您的应用程序的所有依赖项和脚本。

package.json 文件包含您的应用程序的所有依赖项和脚本(了解更多)。

示例

json
{
  "name": "my-project",
  "version": "1.0.0",
  "description": "This is my project",
  "main": "index.js",
  "scripts": {
    "build": "nuxt build", // 打包整体项目
    "dev": "nuxt dev -p 3721", // 加-p可以自定义开发服务器端口
    "ssg": "nuxt generate", // 预渲染生成HTML
    "prepare": "nuxi prepare", // 预备~生成开发环境必备的东西
    "preview": "nuxt preview" // 当build之后,用这个来预览。
  },
  "author": "Your Name",
  "license": "MIT",
  "dependencies": {
    "foo": "^0.0.0"
  },
  "devDependencies": {
    "nuxt": "^3.3.3"
  }
}