-
-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Labels
Description
When using this plugin alongside some react libraries, running a vite build results in a spew of errors like:
../node_modules/wagmi/dist/index.js (1:0) Module level directives cause errors when bundled, "use client" in "../node_modules/wagmi/dist/index.js" was ignored.
There are a bunch of issues filed in several libraries, but I think something is happening when using both this plugin and react, when dependencies use the new use client directive. See this issue in the rollup project:
I have created a small stackblitz environment where running npm run build will result in these warnings:
https://stackblitz.com/edit/vitejs-vite-pcpqdr?file=vite.config.ts
The key thing to note is that just removing this plugin fixes all the warnings. So there is some funky interaction.