Files
Niklas MischkulnigandGitHub e309a6ef70 test: Add tests for client reference side effects (#92774)
Just adding some test coverage

- Turbopack: module are only evaluated when the given module is actually
rendered
- Webpack: all client component modules are evaluated when at least one
client reference renders
2026-04-14 13:09:46 +02:00

9 lines
160 B
TypeScript

'use client'
// @ts-expect-error
if (typeof window !== 'undefined') window.client = true
export function Component() {
return <div>client component</div>
}