@@ -56,13 +56,13 @@ see **[Developing Using Your Local Version of Next.js](./developing-using-local-
...
@@ -56,13 +56,13 @@ see **[Developing Using Your Local Version of Next.js](./developing-using-local-
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:
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:
# Generate a tarball of the Next.js version you want to test
# Generate a tarball of the Next.js version you want to test
$ pnpm pack-next
$ pnpm pack-next --tar
# If you need to build in release mode:
$ pnpm pack-next --release
# You can also pass any cargo argument to the script
# 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`)
# 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
$ pnpm pack-next --no-js-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:
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: