Skip to content

Commit

Permalink
fix: remove extra 'use client' directive
Browse files Browse the repository at this point in the history
When using Next.js and SWC plugin coverage instrumentation, you will get this error due to the duplication of the use client directive:

```
Error: 
  × The "use client" directive must be placed before other expressions. Move it to the top of the file to resolve this issue.
   ╭─[/node_modules/.pnpm/vaul@0.9.0_@types+react-dom@18.2.17_@types+react@18.2.43_react-dom@18.2.0_react@18.2.0/node_modules/vaul/dist/index.mjs:1:1]
 1 │ "use client"
 2 │ "use client";import * as L from "@radix-ui/react-dialog";
```
  • Loading branch information
Kinbaum authored Feb 6, 2024
1 parent f1810ba commit 01d398d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,5 @@ export default defineConfig({
sourcemap: true,
dts: true,
format: ['esm', 'cjs'],
injectStyle: true,
esbuildOptions(options) {
options.banner = {
js: '"use client"',
};
},
injectStyle: true
});

0 comments on commit 01d398d

Please sign in to comment.