@marginallyuseful/soll-vite
v0.0.1-05b9ce9b
Published
Vite plugin for soll — produces chunk-to-source mappings for browser test selection
Readme
@marginallyuseful/soll-vite
Vite plugin for soll — produces chunk-to-source mappings for browser test selection.
Usage
import soll from "@marginallyuseful/soll-vite";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [soll()],
});The plugin hooks into Vite's build lifecycle to extract which source files are
compiled into each output chunk. This data is written as a chunk overlay that
the @marginallyuseful/soll-playwright fixture reads for test selection.
How it works
- On build completion (
writeBundle), the plugin iterates over all output chunks - For each chunk, it extracts the module list (source files) from Vite's module graph
- All paths are normalized to git-root-relative format
- The chunk overlay is written to
.soll/chunk-overlayvia the soll NAPI binding
No sourcemap parsing is needed — the plugin uses the module graph directly.
