๐Ÿ“ฆ cloudflare / vinext

๐Ÿ“„ page.tsx ยท 17 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17import "server-only";

// This page imports "server-only" which should work fine in a Server Component.
// The import is a build-time guard โ€” it ensures this module is never accidentally
// included in a client bundle.

export default function ServerOnlyPage() {
  return (
    <div>
      <h1 data-testid="server-only-heading">Server Only Page</h1>
      <p data-testid="server-only-message">
        This component successfully imported server-only
      </p>
    </div>
  );
}