Skip to content

Commit

Permalink
fix: preserve 'use client' directive in final build (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
morellodev authored Dec 21, 2024
1 parent 324bd2c commit 2de3acc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-bats-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-awesome-reveal": patch
---

Fix "use client" directive preservation to final build
1 change: 1 addition & 0 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"@types/react-is": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"react": "^18.3.1",
"rollup-preserve-directives": "^1.1.3",
"vite": "^5.3.5",
"vite-plugin-dts": "3.9.1"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/lib/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import react from "@vitejs/plugin-react";
import preserveDirectives from "rollup-preserve-directives";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";

Expand All @@ -12,6 +13,7 @@ export default defineConfig({
rollupTypes: false,
}),
react(),
preserveDirectives(),
],
build: {
target: "esnext",
Expand Down
20 changes: 17 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2de3acc

Please sign in to comment.