Change8

@cloudflare/vite-plugin@1.45.0

📦 cloudflare-workersView on GitHub →
1 features🐛 2 fixes🔧 8 symbols

Summary

This release fixes an issue with auth profiles in the Vite plugin and resolves a load time crash on older Node.js versions. It also introduces new type generation options for the experimental new config.

Migration Steps

  1. If you are using the experimental new config (`cloudflare.config.ts`) and want to disable the inclusion of Workers runtime types in `worker-configuration.d.ts`, set `experimental.newConfig.types.includeRuntime` to `false`.

✨ New Features

  • When using the experimental new config (`cloudflare.config.ts`), the plugin now appends the Workers runtime types (generated from your compatibility date and flags) to `worker-configuration.d.ts`, alongside the types inferred from your config. This is controlled by a new `experimental.newConfig.types.includeRuntime` option, which defaults to `true`.

🐛 Bug Fixes

  • Auth profiles (configured via `wrangler auth create` and `wrangler auth activate`) were previously being ignored when using remote bindings with the Vite plugin. This is now fixed.
  • Fix load time crash on Node.js versions earlier than 22.15. The plugin eagerly imported `registerHooks` from `node:module`, which only exists on Node.js v22.15.0+. `registerHooks` is now read lazily, meaning that missing support is only surfaced when using `experimental.newConfig`.

Affected Symbols