wobsoriano / esbuild-vanilla-image-loader

Vanilla Extract Vite Plugin Fix for Image files
MIT License
4 stars 1 forks source link

Incompatible esbuild plugin type #1

Open cs-clarence opened 1 year ago

cs-clarence commented 1 year ago

When using with vite

import { defineConfig } from "vite";
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
import { ImageLoader } from "esbuild-vanilla-image-loader";

export default defineConfig({
  plugins: [
    vanillaExtractPlugin({
      esbuildOptions: {
        plugins: [
        ImageLoader(), // error here
        ],
      },
    }),
  ],
});

I get the type error:

Type 'import("./node_modules/.pnpm/esbuild@0.15.18/node_modules/esbuild/lib/main").Plugin' is not assignable to type 'import("./node_modules/.pnpm/esbuild@0.17.6/node_modules/esbuild/lib/main").Plugin'.
wobsoriano commented 1 year ago

Can you make a basic repro? Looks to be working on a fresh vite project