Skip to content

Commit

Permalink
fix: remove extra 'use client' directive (#261)
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 9, 2024
1 parent b75b703 commit 6e0127d
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 6e0127d

Please sign in to comment.