Skip to content

Commit 81e565e

Browse files
committed
Add "use client" to bundle for React Server Components support
1 parent 185f256 commit 81e565e

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

package-lock.json

Lines changed: 53 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"react-merge-refs": "2.0.1",
6464
"rimraf": "3.0.2",
6565
"rollup": "3.20.2",
66+
"rollup-plugin-banner2": "1.2.2",
6667
"storybook": "^7.0.4",
6768
"styled-components": "^5.3.6",
6869
"ts-jest": "29.0.3",

rollup.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import typescript from "@rollup/plugin-typescript";
22
import { getBabelOutputPlugin } from "@rollup/plugin-babel";
33
import terser from "@rollup/plugin-terser";
4+
import banner from "rollup-plugin-banner2";
45
import pkg from "./package.json" assert { type: "json" };
56

67
const keys = (p) => Object.keys(p || {});
@@ -45,5 +46,6 @@ export default {
4546
preserve_annotations: true,
4647
},
4748
}),
49+
banner(() => '"use client";\n'),
4850
],
4951
};

0 commit comments

Comments
 (0)