Seamlessly integrates Vite with Fastly Compute for serverless edge deployments. Version 0.2.0 is the current release, requiring Node 22+ (including 24-26), Vite ~7.3 or 8, and @fastly/js-compute 3. This plugin extends Vite's build pipeline to support Fastly's compute environment, enabling developers to use Vite's dev server, HMR, and optimized builds for edge functions. It leverages the Viceroy local testing tool and Fastly's JS SDK, differentiating from generic vite plugins by providing Fastly-specific configurations, such as handling edge runtime APIs and output formats for @fastly/js-compute.
npm install vite-plugin-fastlyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal Vite config using vite-plugin-fastly with required Fastly credentials and compute settings.
Upgrade Node to 22+ or use an older version of the plugin if available.
Replace 'backend' with 'backends' as an array of backend configurations.
Order vite-plugin-fastly last in the plugins array.
Use import syntax or configure TypeScript to allow CommonJS interop.
Install @fastly/js-compute: npm install @fastly/js-compute@3
Use default import: import vitePluginFastly from 'vite-plugin-fastly'
Ensure you use the default export and that the plugin version matches Vite version requirements.
Add 'type': 'module' to package.json or rename file to .mjs.