vitejs / vite-plugin-react-swc

Speed up your Vite dev server with SWC
MIT License
831 stars 54 forks source link

Seeing "failed to handle: failed to invoke plugin" error. #128

Closed Matthematic closed 1 year ago

Matthematic commented 1 year ago

I am admittedly new to vite, but I can't figure out what is wrong with my configuration. It is a brand new vite scaffolded app, and I just tried to add the jotai swc plugins to support hmr but I'm getting the following error: image

Here is my vite.config.js. Am I doing something incorrectly?

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import checker from 'vite-plugin-checker';
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    react({
      plugins: [
        ['@swc-jotai/debug-label', {}],
        ['@swc-jotai/react-refresh', {}],
      ],
    }),
    checker({
      // e.g. use TypeScript check
      typescript: true,
    }),
  ],
});
ArnaudBarre commented 1 year ago

Hi! Someone already reported an issue with this plugin without much updates: https://github.com/vitejs/vite-plugin-react-swc/discussions/103

I don't think I can do anything there, I think it's an issue on the plugin or SWC side

ArnaudBarre commented 1 year ago

Closing as unactionable on this repo.