-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 9bb06c5. This was a sort breaking change that could effect using `next/dynamic` in server component, when the imported one is client component. Ideally you shouldn't directly return it due to the property access restriction for client reference. We've already provided related codemod for v15 but this might be a bit surprise for users upgrading to the new patch. Reverted as it's not necessarily part of ESM externals fixes. Fixes #69720
- Loading branch information
Showing
6 changed files
with
19 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
test/e2e/app-dir/app-routes-client-component/app-routes-client-component.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import { nextTestSetup } from 'e2e-utils' | ||
import { FileRef, nextTestSetup } from 'e2e-utils' | ||
import path from 'path' | ||
|
||
describe('referencing a client component in an app route', () => { | ||
const { next } = nextTestSetup({ | ||
files: __dirname, | ||
files: new FileRef(path.join(__dirname)), | ||
}) | ||
|
||
it('responds without error', async () => { | ||
expect(JSON.parse(await next.render('/runtime'))).toEqual({ | ||
clientComponent: 'function', | ||
myModuleClientComponent: 'function', | ||
// Turbopack's proxy components are functions | ||
clientComponent: process.env.TURBOPACK ? 'function' : 'object', | ||
myModuleClientComponent: process.env.TURBOPACK ? 'function' : 'object', | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters