Skip to content

Commit

Permalink
feat: mark react-ui components as client components (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Jun 23, 2024
1 parent 91d8c8f commit f0da6e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/react-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@assistant-ui/react-ui",
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",
"exports": {
".": {
Expand All @@ -14,8 +14,8 @@
}
},
"./styles.css": {
"types": "./styles.css.d.ts",
"default": "./styles.css"
"types": "./dist/styles.css.d.ts",
"default": "./dist/styles.css"
}
},
"source": "./src/index.ts",
Expand Down
8 changes: 7 additions & 1 deletion packages/react-ui/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const tailwindcssTransformerCode: Plugin = {
"utf8",
),
});

await fs.promises.mkdir(outDir, { recursive: true });
await fs.promises.writeFile(path.join(outDir, "styles.css"), styleSheet);
await fs.promises.writeFile(
Expand All @@ -50,7 +51,12 @@ export default defineConfig(() => {
format: ["cjs", "esm"],
dts: true,
sourcemap: true,
clean: true,
// clean: true,
esbuildPlugins: [tailwindcssTransformerCode],
esbuildOptions: (options) => {
options.banner = {
js: '"use client";',
};
},
};
});

0 comments on commit f0da6e7

Please sign in to comment.