Nightly 发布渠道

夜间发布渠道允许使用直接从代码库最新提交构建的 Nuxt。

Nuxt 每天都会提交代码、进行改进和修复错误。你可以选择在下一个版本发布之前提前测试它们。

¥Nuxt lands commits, improvements, and bug fixes every day. You can opt in to test them earlier before the next release.

在提交合并到 nuxt/nuxtmain 分支并通过所有测试后,我们将使用 GitHub Actions 触发自动 npm 发布。

¥After a commit is merged into the main branch of nuxt/nuxt and passes all tests, we trigger an automated npm release, using GitHub Actions.

你可以使用这些 'nightly' 版本来测试新功能和变更。

¥You can use these 'nightly' releases to beta test new features and changes.

这些 'nightly' 版本的构建、发布方法和质量与稳定版本相同。唯一的区别是你应该经常检查 GitHub 仓库以获取更新。在审核过程中和自动化测试中,可能会有轻微的回归问题未被发现。因此,我们在每次发布之前内部使用此渠道仔细检查所有内容。

¥The build and publishing method and quality of these 'nightly' releases are the same as stable ones. The only difference is that you should often check the GitHub repository for updates. There is a slight chance of regressions not being caught during the review process and by the automated tests. Therefore, we internally use this channel to double-check everything before each release.

仅在夜间发布渠道上可用的功能在文档中会以警告标记。
latest 夜间发布渠道目前正在跟踪 Nuxt v4 分支,这意味着它现在极有可能发生重大变更。 - 小心!¥The latest nightly release channel is currently tracking the Nuxt v4 branch, meaning that it is particularly likely to have breaking changes right now - be careful!你可以选择使用 "nuxt": "npm:nuxt-nightly@3x" 加入 3.x 分支的夜间版本。¥You can opt in to the 3.x branch nightly releases with "nuxt": "npm:nuxt-nightly@3x".

选择加入

¥Opting In

package.json 中更新 nuxt 依赖:

¥Update nuxt dependency inside package.json:

package.json
{
  "devDependencies": {
--    "nuxt": "^3.0.0"
++    "nuxt": "npm:nuxt-nightly@3x"
  }
}

删除锁文件(package-lock.jsonyarn.lockpnpm-lock.yamlbun.lockb)并重新安装依赖。

¥Remove lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb) and reinstall dependencies.

选择退出

¥Opting Out

package.json 中更新 nuxt 依赖:

¥Update nuxt dependency inside package.json:

package.json
{
  "devDependencies": {
--    "nuxt": "npm:nuxt-nightly@3x"
++    "nuxt": "^3.0.0"
  }
}

删除锁文件(package-lock.jsonyarn.lockpnpm-lock.yamlbun.lockb)并重新安装依赖。

¥Remove lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml, or bun.lockb) and reinstall dependencies.

使用 Nightly nuxi

¥Using Nightly nuxi

由于构建方法是为了减少 nuxi 包的大小,因此所有 CLI 依赖均已打包。:br 你可以使用夜间发布渠道获取依赖更新和 CLI 改进。

要试用最新版本的 nuxt/cli

¥To try the latest version of nuxt/cli:

Terminal
npx nuxi-nightly@latest [command]

:

Read more in Docs > API > Commands.

了解更多关于可用命令的信息。

¥Read more about the available commands.

::