We should change our plugin tests to not require a build step. Like https://github.com/lucacasonato/esbuild_deno_loader/blob/main/mod_test.ts
So the plugin runs as a part of vite/esbuild/webpack.
And we can reasonably run esbuild in a unit test. And supply it with the plugin.
import ourCutePlugin from "../path-to-wesl-plugin.ts"
const res = await esbuild.build({
...DEFAULT_OPTS,
plugins: [ourCutePlugin],
entryPoints: ["./testdata/mod.ts"],
});
We should change our plugin tests to not require a build step. Like https://github.com/lucacasonato/esbuild_deno_loader/blob/main/mod_test.ts
So the plugin runs as a part of vite/esbuild/webpack.
And we can reasonably run esbuild in a unit test. And supply it with the plugin.