Packages

@cloudflare/vite-plugin

1.70.1 · 19 Nov 2026MIT12.3M / weekRepositoryHomepagenpmAtom feed

Your version

1.7.0

17 Jun 2025Where it was published

1.70.1 is the newest release of 1.x.

In short

2 new3 fixed3 internal

Release note

Minor Changes

  • Support run_worker_first.

    run_worker_first has been expanded to accept an array of routes that should go directly to your Worker. Additionally, routes can be omitted by adding a ! prefix. These negative routes will be treated as assets.

    This is a new way to define routing explicitly and, when provided, overrides the implicit routing behavior.

    {
        "assets": {
            "not_found_handling": "single-page-application",
            "run_worker_first": [
                "/api/*", // These routes go directly to the Worker
                "!/api/docs/*", // These routes are still treated as assets
            ],
        },
    }

    The previous behavior of setting "run_worker_first": true to always invoke your Worker is also now supported.

Patch Changes

  • Avoid crashing on unknown service bindings at startup

    With Dev Registry support, the plugin no longer throws an assertion error during startup when a service binding references a named entrypoint from an unknown worker. Instead, an appropriate runtime error will be returned if the worker cannot be resolved.

  • Enable HTML handling for HTML files in the public directory.

    It is generally encouraged to use HTML files as entry points in Vite so that their dependencies are bundled. However, if you have plain HTML files that should simply be copied to the root of the output directory as-is, you can place these in the public directory and they will now work as expected in dev.

  • Ensure that globals are polyfilled before every import

  • Performance improvement: restart a mixed mode session only if the worker's remote bindings have changed

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.