hex2f / marz

🚀 A Fast and Lightweight React Server Components Framework for Bun
MIT License
392 stars 13 forks source link

bug: client components can't be named exports, must be default #2

Closed hex2f closed 9 months ago

hex2f commented 9 months ago

The following code currently breaks the bundler, as only default exports are handled.

// components/button.tsx
"use client";

export function SmallButton() {
  return <button>...</button>
}

// pages/index.tsx
import { SmallButton } from './components/button.tsx'

export function Page() {
  return <SmallButton />
}