@cloudflare/vite-plugin
1.70.1 · 19 Nov 2026MIT12.3M / weekRepositoryHomepagenpmAtom feed
0.1.21 is the newest release of 0.1.x.
In short
1 new4 fixed2 internal
Security
1 advisory affects 0.1.20; 1.6.0 fixes them
- ModerateCloudflare Vite plugin exposes secrets over the built-in dev serverGHSA-4pfg-2mw5-f8jx · 8 Jul 2025Fixed in 1.6.0
Release note
Patch Changes
Ensure that Node.js polyfills are pre-optimized before the first request
Previously, these polyfills were only optimized on demand when Vite became aware of them.
This was either because Vite was able to find an import to a polyfill when statically analysing the import tree of the entry-point,
or when a polyfilled module was dynamically imported as part of a executing code to handle a request.In the second case, the optimizing of the dynamically imported dependency causes a reload of the Vite server, which can break applications that are holding state in modules during the request.
This is the case of most React type frameworks, in particular React Router.Now, we pre-optimize all the possible Node.js polyfills when the server starts before the first request is handled.
Make sure that users can specify inspector port
0to use a random portAdd validation for the
configPathoption in the plugin config that clearly indicates any issues.Replace modules runtime checks with vite environment config validation
currently at runtime the vite plugin applies checks to make sure that
external files are not being imported, such checks are however too
restrictive and prevent worker code to perform some valid imports from
node_modules (e.g.import stylesheet from "<some-package>/styles.css?url";)the changes here replace the runtime checks (allowing valid imports from
node_modules) with some validation to the worker vite environment configurations,
specifically they make sure that the environment doesn't specify invalidoptimizeDeps.excludeandresolve.externaloptionsMake sure that the plugin keeps looking for available inspector ports by default
this change updates the plugin so that if an inspector port is not specified and the
default inspector port (9229) is not available it keeps looking for other available
port instead of crashing
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.