-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix GlobalError interop and add test case (#49033)
### What? fixes handling of GlobalError interop adds a test case for client component bug ### Why? app dir client component interop is broken ### Turbopack changes * vercel/turborepo#4597 <!-- Tobias Koppers - add rspack to our benchmark suite --> * vercel/turborepo#4761 <!-- Tobias Koppers - Do not use interop logic on proxy modules -->
- Loading branch information
Showing
9 changed files
with
81 additions
and
49 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
7 changes: 7 additions & 0 deletions
7
...c/crates/next-dev-tests/tests/integration/next/app/named-client-comp/input/app/layout.tsx
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function RootLayout({ children }: { children: any }) { | ||
return ( | ||
<html> | ||
<body>{children}</body> | ||
</html> | ||
) | ||
} |
9 changes: 9 additions & 0 deletions
9
...swc/crates/next-dev-tests/tests/integration/next/app/named-client-comp/input/app/page.tsx
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Test } from './test' | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<Test /> | ||
</div> | ||
) | ||
} |
12 changes: 12 additions & 0 deletions
12
...swc/crates/next-dev-tests/tests/integration/next/app/named-client-comp/input/app/test.tsx
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use client' | ||
|
||
import { useEffect } from 'react' | ||
|
||
export function Test() { | ||
useEffect(() => { | ||
import('@turbo/pack-test-harness').then(() => { | ||
it('should allow to import a named export from a client component', () => {}) | ||
}) | ||
return () => {} | ||
}, []) | ||
} |
5 changes: 5 additions & 0 deletions
5
...c/crates/next-dev-tests/tests/integration/next/app/named-client-comp/input/next.config.js
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
experimental: { | ||
appDir: true, | ||
}, | ||
} |
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
Oops, something went wrong.