Packages

@cloudflare/autoconfig

0.13.3 · 20 Nov 2026MIT OR Apache-2.09.9k / weekRepositoryHomepagenpmAtom feed

Your version

64 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 0.13.x · latest line
  2. 0.13.3

    20 Nov 2026
    • Generate cf configuration without a runtime dependency on cf

      Use a type-only import when generating cloudflare.config.ts, so static directories without a package.json or local cf installation can load their configuration after setup.

  3. 0.13.2

    18 Nov 2026
    • Breaking

      Require Vite 7 or later when autoconfiguring Vite projects for cf

      cf installs @cloudflare/vite-plugin v2, which requires Vite 7 or 8, so a Vite 6 project is now rejected before any changes are made instead of failing during dependency installation.

    • Fix Astro projects set up for cf getting a wrangler.jsonc instead of a cloudflare.config.ts

      Autoconfig installed astro@beta to get the astro add that writes cloudflare.config.ts, but package managers such as pnpm kept the project's newer stable Astro, whose astro add writes wrangler.jsonc, so the build failed. Autoconfig now runs the beta's astro add once without installing it, and keeps the project's Astro version.

    • Stop adding the SolidStart pre-bundling exclude on cf for SolidStart 2.2.3 and later

      SolidStart 2.2.3 keeps @solidjs/start out of server pre-bundling itself, so autoconfig now adds environments.ssr.optimizeDeps.exclude to the Vite config, or asks you to add it, only for earlier 2.x versions.

  4. 0.13.1

    17 Nov 2026
    • Use vinext 1.4.6 or later when configuring Next.js projects

      Autoconfig now runs vinext init with vinext@^1.4.6 (previously ^1.3.0), so newly configured Next.js projects pick up the latest vinext fixes.

  5. 0.13.0

    16 Nov 2026
    • Run experimental cf projects with their installed Vite or Vite+ commands

      cf dev, cf build, and deployments that build your project can use Vite or Vite+ even when no framework command is detected. This removes the need for the internal cf-vite delegate and supports dependencies declared and hoisted at the root of a configured workspace. A workspace application using a custom-named Vite config should declare @cloudflare/vite-plugin in its own manifest, or add vite or vite-plus as a dependency or dev dependency to identify its tooling; this keeps shared root tools from selecting Vite for non-Vite siblings. Configs passed later via --config are evaluated by Vite when the command runs. Existing framework commands keep their priority. Consumers resolve bare executables using the detected nodeModulesPaths in order, adding .bin to each directory. Lookup stops at the validated workspace root; standalone applications use only their own node_modules/.bin.

      Project inspection can recognize an existing Cloudflare configuration before dependencies are installed. Running a command provides guidance when the required tools are missing or the plugin version does not support cf profiles (>=2.0.0-beta.v.13 <3). Vite evaluates the project configuration when the command runs, including dynamic configs and custom config files. Repair guidance uses the project’s detected package manager. Automatic setup asks users to convert CommonJS .cjs and .cts Vite configs to ESM imports and exports in .mjs or .mts before adding the ESM-only Cloudflare plugin. Native builds also work with the Windows shell. Pages migration safeguards, unsupported-framework setup checks, and Wrangler command selection retain their existing behavior.

    • Install the Vite plugin release candidate when configuring projects for cf

      Configuring a Vite project for cf now installs @cloudflare/vite-plugin@^2.0.0-rc.0 instead of ^2.0.0-beta.v.0, so an existing lockfile can't keep a beta that doesn't support the generated configuration.

  6. 0.12.x
  7. 0.12.0

    12 Nov 2026
    • Support SolidStart on cf from version 2.0.0

      Autoconfig now sets up SolidStart 2 projects for cf with the Cloudflare Vite plugin. Projects configured for Wrangler keep using Nitro.

  8. 0.11.x
  9. 0.11.0

    10 Nov 2026
    • Detect cf applications inside package-manager workspaces without requiring an application-local lockfile.

      Use the enclosing workspace's package manager while keeping framework commands, output directories, and package.json updates local to the application. Wrangler's detection and command behavior are unchanged.

      This changes the pre-1.0 cf integration contract: framework commands are returned without package-manager prefixes for all cf projects, including standalone applications. Before upgrading, cf consumers must resolve executables from the application's and ancestor directories' node_modules/.bin for build, dev, and the autoconfig runCommand callback. Older cf runners without local executable resolution must be updated first.

    • Fix JavaScript configuration parsing for Svelte projects using object spread

      Use a parser that supports object spread when updating JavaScript configuration files. This prevents configuration failures for Svelte projects using Drizzle or Better Auth and other framework configurations containing modern JavaScript syntax.

      Vite autoconfiguration reports a configuration error when an object spread, computed property, or accessor after the plugins array could override the Cloudflare plugin. Place the effective plugins array after these properties before retrying autoconfiguration.

  10. 0.10.x
  11. 0.10.0

    9 Nov 2026
    • Configure Astro projects for cf with the latest compatible beta releases

      Astro 7 projects can now be automatically configured for cf with the latest compatible beta releases of Astro and the Cloudflare adapter.

  12. 0.9.x
  13. 0.9.1 – 0.9.33 releases that only update dependencies@cloudflare/workers-utils 0.52.0@cloudflare/cli-shared-helpers 0.3.4@cloudflare/config 0.30.2and 1 moreShow each
  14. 0.9.0

    1 Nov 2026
    • Add an outputDir option to getDetailsForAutoConfig

      Callers that already know which directory holds their built static assets can pass it as outputDir instead of having autoconfig detect one. Relative paths are resolved against the project path. This selects static-asset configuration for unconfigured projects even when framework dependencies are present, without running framework migrations or builds that could replace the requested assets. Existing Workers and Pages configurations, including deployments configured through the Cloudflare Vite plugin alone, retain their usual detection behavior.

      Checking whether a Vite project already uses the Cloudflare plugin no longer writes the Vite config back to disk, preserving its line endings and trailing newline.

    • Support React Router on cf from version 8.5.1

      React Router 8.5.1 builds into the output directories that the Cloudflare Vite plugin v2 uses, which cf needs. Autoconfig now requires React Router 8.5.1 or later when configuring a project for cf, and stops with a clear message on earlier versions instead of letting cf build fail later. Projects configured for Wrangler keep the existing minimum of React Router 7.0.0.

    • Run the project-local Vite+ executable for Vite+ projects

      Use vp dev and vp build when Vite+ is declared. Its Vite alias does not expose a vite executable, so invoking vite can fail with pnpm or cause npm to fetch a separate Vite. Preserve framework-owned commands and custom scripts.

  15. 0.8.x
  16. 0.8.3

    29 Oct 2026
    • Stop autoconfig in non-interactive runs when a project root holds both static files and a Pages functions directory

      When a project without a detected framework has a functions directory, autoconfig asks whether it is a Cloudflare Pages project. Non-interactive runs (CI and coding agents) assume it is not and continue as a static site. When the static files are in the project root, that deploys the root as static assets, and the Pages Functions (the project's API routes) are not deployed.

      In that case autoconfig now stops with an error explaining that Pages Functions cannot be migrated automatically yet. For Pages Functions it suggests moving the static files into a subdirectory and deploying with wrangler pages deploy, or migrating the Functions to a Worker; for a functions directory that is not Pages Functions, it suggests moving the static files into a subdirectory or adding a configuration file. Projects whose static files are already in a subdirectory, projects detected as Pages or with a detected framework, and interactive runs where the user answers the prompt are unaffected.

    • Write a protective .assetsignore when autoconfig uses the project root as the static assets directory

      Autoconfig is meant to write an .assetsignore when the project root itself is the assets directory, so that local files are not uploaded as public assets. The check compared the detected output directory, which is relative ("."), with the absolute project path, so it never matched and no .assetsignore was written. A static project with an index.html at its root (for example after wrangler setup or a zero-config wrangler deploy) then uploaded files such as .env, .dev.vars, .git and node_modules as public assets.

      The check now resolves the assets directory that the generated configuration uses and compares it with the project root, so frameworks that set their own build output directory (such as Nuxt or SvelteKit) do not get an unused root .assetsignore. The generated .assetsignore also covers what a Cloudflare Pages upload skips, alongside the existing .wrangler, .dev.vars* and .env* entries: /_worker.js, /_routes.json and /functions at the root (so nested paths such as blog/functions/index.html are still uploaded), node_modules, .git and .DS_Store at any depth, and .npmrc. If an existing .assetsignore only lists a narrower pattern such as .env, .env* is added so that files like .env.production are skipped too. When the project root of an assets-only project contains a Pages functions directory or _worker.js, autoconfig now warns that it will not be deployed, since it is excluded from the assets and not run as server code.

  17. 0.8.2

    28 Oct 2026
    • Include the types generated by cf workers types in tsconfig.json when configuring for cf

      cf workers types writes the Worker's types to .cloudflare/types. Patterns in the include array of tsconfig.json, such as **/*, skip folders whose names start with a dot, so type checking couldn't find Env after autoconfig. Autoconfig now adds .cloudflare/types to that include array for cf projects with a Worker, as cf init does for new projects. When tsconfig.json has no include array, autoconfig asks you to add the entry yourself.

  18. 0.8.0

    22 Oct 2026
    • Configure Next.js 16 and later projects with vinext when targeting cf

      Autoconfig now runs vinext init (from vinext@^1.3.0) instead of @opennextjs/cloudflare migrate for projects on Next.js 16 or later that target cf. vinext builds the project with the Cloudflare Vite plugin, producing the Build Output that cf deploys, and creates the project's cloudflare.config.ts. Autoconfig passes --platform=cloudflare --cdn-cache=none --image-optimization=cloudflare-images --no-prerender so that vinext init does not prompt and can run in agent environments, and passes the selected Worker name with --name so that vinext uses it rather than deriving one from package.json.

      Projects on earlier Next.js versions (including 16.0.0 prereleases), which vinext does not support, and all projects targeting Wrangler continue to be configured with OpenNext.

    • Install @cloudflare/vite-plugin@^2.0.0-beta.v.0 when autoconfiguring projects for cf

  19. 0.7.x
  20. 0.7.2 – 0.7.1110 releases that only update dependencies@cloudflare/workers-utils 0.47.3@cloudflare/cli-shared-helpers 0.2.7@cloudflare/config 0.27.0Show each
  21. 0.7.1

    28 Sep 2026
    • Fix the type generation script added to TypeScript projects configured for cf.

      The cf-typegen script now runs cf workers types instead of the unsupported cf types command. Projects configured for Wrangler continue to use wrangler types.

  22. 0.7.0

    27 Sep 2026
    • Install the beta Cloudflare Vite plugin for cf

      When targeting cf, autoconfig now installs @cloudflare/vite-plugin@beta so supported projects use the Vite plugin v2 prerelease instead of the latest stable release. Wrangler autoconfiguration continues to install the latest stable release.

    • Reject frameworks that cf cannot currently configure

      Autoconfig now directs Analog, Angular, Nuxt, Qwik, Solid Start, SvelteKit, Vike, and Waku projects to Wrangler when invoked by cf, before changing project files. Wrangler autoconfiguration remains supported for these frameworks.

  23. 0.6.x
  24. 0.6.6

    25 Sep 2026
    • Keep Node.js ESM packages working when consumers rebundle them as CommonJS

      Node.js-targeted ESM bundles now provide a real require implementation for bundled CommonJS dependencies. This avoids downstream patches for dynamic require calls and keeps the packages usable when a consumer rebundles them to CommonJS.

  25. 0.6.4 – 0.6.52 releases that only update dependencies@cloudflare/workers-utils 0.43.0@cloudflare/cli-shared-helpers 0.1.39@cloudflare/config 0.18.0Show each
  26. 0.6.3

    24 Sep 2026
    • Prevent static-site detection from failing on inaccessible child directories

      Autoconfig now checks each candidate directory's index.html directly and ignores expected missing-file and permission errors. This allows commands such as cf build to run from directories containing protected folders, including a macOS home directory with .Trash.

  27. 0.6.1 – 0.6.22 releases that only update dependencies@cloudflare/workers-utils 0.41.1@cloudflare/cli-shared-helpers 0.1.36@cloudflare/config 0.17.0Show each
  28. 0.6.0

    21 Sep 2026
    • Define experimental Cloudflare configuration with a single default export

      Experimental cloudflare.config.ts files now define settings and resources together in a default-exported defineConfig() call. Add a Worker under worker, add Containers to the containers array, or omit both to provide settings only.

      import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };
      
      export default defineConfig({
        accountId: "...",
        complianceRegion: "public",
        worker: {
            name: "my-worker",
            compatibilityDate: "2026-09-18",
            entrypoint,
        },
      });
  29. 0.5.x
  30. 0.5.1

    18 Sep 2026
    • Defer configured unsupported frameworks to an installed Cloudflare dev server

      Configured cf projects whose detected framework is not supported by autoconfig no longer run inferred package scripts: npm run build as these may be invalid, e.g a build script cf build causes recursive calls cf build -> npm run build -> cf build. This allows cf to use its existing Cloudflare dev-server delegation instead.

  31. 0.5.0

    17 Sep 2026
    • Expose mode support for autoconfigured framework commands

      Detected Astro and Vite frameworks now report that their build and development commands support --mode. Other frameworks remain unsupported by default.

  32. 0.4.x
  33. 0.4.7

    16 Sep 2026
    • Stop adding a preview script when configuring projects for cf

      Projects can continue using their existing development and preview scripts, or invoke cf dev directly. Wrangler-targeted autoconfiguration continues to add its existing preview script.

  34. 0.4.6

    15 Sep 2026
    • Recognize Astro 7 as officially supported by autoconfig

      Astro 7 projects no longer receive an unsupported-version warning during automatic configuration. Astro 7 uses the existing native astro add cloudflare configuration path introduced for Astro 6.

  35. 0.4.4

    10 Sep 2026
    • Remove the unused Nitro Vite import when autoconfiguring TanStack Start for Cloudflare

      TanStack Start projects created for Node.js no longer retain an unused Nitro Vite import after Cloudflare autoconfiguration.

  36. 0.4.1 – 0.4.33 releases that only update dependencies@cloudflare/config 0.11.0@cloudflare/workers-utils 0.37.0@cloudflare/cli-shared-helpers 0.1.28Show each
  37. 0.4.0

    28 Aug 2026
    • Resolve canonical framework build commands for the cf target

      Autoconfig now returns framework commands instead of package scripts for cf. Generated deploy scripts delegate build selection to cf deploy. Wrangler's existing package-script detection remains unchanged.

  38. 0.3.x
  39. 0.3.0

    25 Aug 2026
    • Prepare autoconfig for multiple configuration targets

      Add target-specific configuration output and command detection while preserving Wrangler's existing setup and deployment behavior.

  40. 0.2.x
  41. 0.2.8 – 0.2.92 releases that only update dependencies@cloudflare/workers-utils 0.34.0@cloudflare/cli-shared-helpers 0.1.25Show each
  42. 0.2.7

    12 Aug 2026
    • Stop adding a redundant nodejs_compat flag to generated Wrangler configurations

      create-cloudflare and wrangler setup write today's date as the compatibility_date, and from 2026-08-04 that already enables nodejs_compat. Adding the flag as well made the generated project fail to start with "The compatibility flag nodejs_compat became the default as of 2026-08-04 so does not need to be specified anymore", so the flag is now only added for earlier compatibility dates.

      create-cloudflare also removes the flag when a template, or a framework's own scaffolder, already wrote it into a configuration that ends up using such a compatibility date, and still installs @types/node for these projects even though there is no longer a flag to detect them by.

      wrangler setup does the same for a wrangler.json(c) that is already in the project: it writes today's date over whatever date that configuration was written for, so a nodejs_compat it finds there is removed as part of writing the file.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.