Skip to content

Test plugin without build step #181

Description

@stefnotch

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"],
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Unprioritized

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions