Migrate to 7.0.0
import { Steps } from ‘@astrojs/starlight/components’;
7.0.0 replaces the old serve/deploy/publish/next-build executors with
targets inferred from your Wrangler config, and removes the Next.js + webpack
integration entirely. Two migrations handle the transition: one deterministic,
one prompt-based.
Before you start
Section titled “Before you start”- Commit any uncommitted work. The migration modifies
nx.jsonand projectproject.json/package.jsonfiles. - Review the inferred targets reference to understand what the new targets look like.
-
Generate the migration file
Run
nx migrateagainst the new version:bunx nx migrate @naxodev/nx-cloudflareNx generates a
migrations.jsonfile listing the migrations to apply and the dependency version bumps (Nx 23, Wrangler v4.98). Review it before proceeding. -
Apply the deterministic migration
The
update-7-0-0-move-to-inferencemigration runs automatically. It removes any project target whose executor is@naxodev/nx-cloudflare:serve,:deploy,:publish, or:next-build, and registers@naxodev/nx-cloudflare/plugininnx.jsonso those targets are re-provided as inferred targets.bunx nx migrate --run-migrationsIf you had customized a removed target with executor options (e.g.
port,vars,routes,compatibility*), the migration logs a warning naming the dropped option keys. Move that configuration into your Wrangler config (wrangler.jsonc/.toml), where Wrangler reads it natively, or pass it as command-line args to the inferred target. -
Remove Next.js references
The
update-7-0-0-drop-nextjsmigration is prompt-based — it generates instructions but does not modify files automatically. Search the workspace for references to the deleted symbols and remove or replace them:next.config.js/next.config.mjs— remove imports ofwithNxorcomposePluginsfrom@naxodev/nx-cloudflare. If the config only existed to wrap Next.js for Cloudflare via this plugin, delete the wrapper and keep a plain Next.js config.package.json— drop any@naxodev/nx-cloudflare-based Next.js build scripts that called thenext-buildexecutor or the webpack composition.- Choose a replacement path for Next.js on Cloudflare. This plugin no
longer provides one. The Cloudflare-recommended approach is
@opennextjs/cloudflare(OpenNext), which builds a Next.js app into a Cloudflare Worker. Migrate to it, or to Cloudflare Pages, as appropriate.
Non-Next.js Workers are unaffected — only touch projects that referenced the removed symbols.
Verify
Section titled “Verify”Confirm the inferred targets resolve for each affected project:
bunx nx show project <name>
Check that serve, deploy, typegen, version-upload, and tail appear as
targets, and that no target references @naxodev/nx-cloudflare:next-build.
Next steps
Section titled “Next steps”- Inferred targets reference —
serve,deploy,typegen,version-upload,tail - How Wrangler config inference works — why targets are inferred from your Wrangler config
- Plugin options — customizing inferred target names