npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vite-plugin-fastly

v0.0.3

Published

vite-plugin-fastly

Readme

vite-plugin-fastly

vite-plugin-fastly is a Vite plugin for developing and building Fastly Compute JavaScript applications with Vite.

Fastly's official local development solution is the fastly compute serve command (available via the Fastly CLI). It supports a --watch flag that rebuilds and reloads your application when source files change. However, this rebuild process can be slow since it involves bundling your application and compiling it to WebAssembly.

vite-plugin-fastly relies instead on Vite's Environment API to transform your source files on-the-fly during local development, resulting in a much faster feedback loop. It also enables access to Vite features like glob imports and the vast ecosystem of Vite plugins.

Usage scenarios

You can use vite-plugin-fastly to build pure server-side Fastly Compute JavaScript applications, or full-stack applications that also include client-side code, for example a React application with SSR.

Check the starter examples:

How it works

During development, vite-plugin-fastly works by launching a remote module runner via fastly compute serve that communicates with the Vite development server to transform source files on-the-fly and run them via a Vite ModuleRunner. This runner, in turn, loads your entry module and passes incoming requests to it.

The plugin also adds a middleware to the Vite development server that proxies requests to the remote module runner. This proxy is placed before Vite's own middlewares if you don't configure a client entry point via environments.client.build.rollupOptions.input, or after if you do. When placed before, the setup essentially disables Vite's client-side features.

Limitations

Fastly Compute JavaScript runtime (and its local emulator) has a heap size limit of 128MB. Since the plugin uses on-the-fly compilation, this means that large files or dependencies may cause out-of-memory errors during development.

vite-plugin-fastly tries to mitigate this by enabling minification during Vite's dependency pre-bundling. Using dynamic imports to lazy-load source files and dependencies can also help reduce per-request memory usage.