vitejs / vite-plugin-react-swc

Speed up your Vite dev server with SWC
MIT License
778 stars 50 forks source link

fix: Add `enforce: "pre"` to mdx plugin so build script works #81

Closed greypants closed 1 year ago

greypants commented 1 year ago

Adds solution referenced here: https://github.com/vitejs/vite-plugin-react/blob/main/playground/mdx/vite.config.ts#L8

Without it, the build script throws:

[vite:react-swc]
  × Expected ident
ArnaudBarre commented 1 year ago

Hi, can you provide a repro? The current playground builds correctly without it. The SWC plugin does not require "pre" because esbuild is disabled