canary
.canary
.canary
branch are published to the @canary
tag on npm regularly.corepack enable pnpm
rust-rocksdb
):
sudo apt install lld clang
gh repo clone vercel/next.js -- --filter=blob:none --branch canary --single-branch
git checkout -b MY_BRANCH_NAME origin/canary
pnpm install
pnpm dev
pnpm types
to compile declaration files from
TypeScript.
Note: You may need to repeat this step if your types get outdated.
git add .
git commit -m "DESCRIBE_YOUR_CHANGES_HERE"
gh pr create
For instructions on how to build a project with your local version of the CLI, see Developing Using Your Local Version of Next.js as linking the package is not sufficient to develop locally.
Since Turbopack doesn't support symlinks when pointing outside of the workspace directory, it can be difficult to develop against a local Next.js version. Neither pnpm link
nor file:
imports quite cut it. An alternative is to pack the Next.js version you want to test into a tarball and add it to the pnpm overrides of your test application. The following script will do it for you:
pnpm pack-next --release && pnpm unpack-next path/to/project
Or without running the build:
pnpm pack-next --no-build --release && pnpm unpack-next path/to/project
Without going through a tarball (only works if you've added the overrides from pack-next
):
pnpm patch-next path/to/project
Supports the same arguments:
pnpm patch-next --no-build --release path/to/project
# Generate a tarball of the Next.js version you want to test
$ pnpm pack-next
# If you need to build in release mode:
$ pnpm pack-next --release
# You can also pass any cargo argument to the script
# To skip the `pnpm i` and `pnpm build` steps in next.js (e. g. if you are running `pnpm dev`)
$ pnpm pack-next --no-build
Afterwards, you'll need to unpack the tarball into your test project. You can either manually edit the package.json
to point to the new tarballs (see the stdout from pack-next
script), or you can automatically unpack it with:
# Unpack the tarballs generated with pack-next into project's node_modules
$ pnpm unpack-next path/to/project
Rust builds quickly add up to a lot of disk space, you can clean up old artifacts with this command:
pnpm sweep
It will also clean up other caches (pnpm store, cargo, etc.) and run git gc
for you.
If you want to automatically use APFS disk compression on macOS for node_modules/
and target/
you can install a launch agent with:
./scripts/LaunchAgents/install-macos-agents.sh
Or run it manually with:
./scripts/macos-compress.sh
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )