vitejs / vite-plugin-react-swc

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

Segmentation fault using plugins #97

Closed samchouse closed 1 year ago

samchouse commented 1 year ago

Just using a simple plugin such as @swc/plugin-noop causes a segfault when trying to load the page in dev mode.

// vite.config.ts
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vitest/config";

export default defineConfig({
  plugins: [
    react({
      plugins: [["@swc/plugin-noop", {}]],
    }),
  ],
});
ArnaudBarre commented 1 year ago

Can you please provide more context about your setup? OS, node version, @swc/core version?

I have a test suite running plugins that runs both on my laptop (Mac Intel) and on Linux on GH actions.

And this plugin is a one file using the node api of SWC in a simple way, so I'm not sure there is anything I can do

samchouse commented 1 year ago

Sorry, this was an issue with the monorepo setup I had, noop works now in the new setup and a clean Vite project.