mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Should be able to resolve `exports.import` condition for esm packages only when import them in server components Fixes: #42534 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md`
30 lines
851 B
JavaScript
30 lines
851 B
JavaScript
import ClientFromDirect from '../../components/client'
|
|
import ClientFromShared from '../../components/shared'
|
|
import SharedFromClient from '../../components/shared-client'
|
|
import Bar from '../../components/bar'
|
|
|
|
export default function Page() {
|
|
// All three client components should be rendered correctly, but only
|
|
// shared component is a server component, and another is a client component.
|
|
// These two shared components should be created as two module instances.
|
|
|
|
// It's expected to have hydration mismatch here.
|
|
return (
|
|
<div id="main" suppressHydrationWarning>
|
|
{/* <Random /> */}
|
|
<br />
|
|
<ClientFromDirect />
|
|
<br />
|
|
<ClientFromShared />
|
|
<br />
|
|
<ClientFromShared />
|
|
<br />
|
|
<SharedFromClient />
|
|
<br />
|
|
<SharedFromClient />
|
|
<br />
|
|
<Bar />
|
|
</div>
|
|
)
|
|
}
|