Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react): add "use client" for react bundle #1902

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/react/build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineBuildConfig } from "unbuild"

export default defineBuildConfig({
rollup: {
output: {
banner: (chunk: any) => {
if (chunk.name === "index") {
return `'use client';`

Check warning on line 8 in packages/react/build.config.ts

View check run for this annotation

Codecov / codecov/patch

packages/react/build.config.ts#L8

Added line #L8 was not covered by tests
}
},
},
},
})
Loading