Vite plugin for [Fastly Compute](https://developer.fastly.com/learning/compute/javascript/) with `vitest`.
npm install vite-plugin-fastly-js-computeVite plugin for Fastly Compute with vitest.
- Provide Fastly Compute global variables/classes which are defined inside fastly runtime
- Resolve namespaced imports like fastly:xxx
- node.js (prefer version 18.19 or later)
yarn:
``shell`
yarn add -D vite-plugin-fastly-js-compute
npm:
`shell`
npm install -D vite-plugin-fastly-js-compute
This package supports TypeScript ESM tyle.
ESM:
`js
// vitest.config.ts
///
import { defineConfig } from "vitest/config";
import fastlyCompute from "vite-plugin-fastly-compute-js";
export default defineConfig({
plugins: [fastlyCompute()],
test: {
...
},
});
``
- Fork this repository
- Customize / Fix problem
- Send PR :-)
- Or feel free to create issues for us. We'll look into it
Yoshiaki Sugimoto
MIT