mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Currently in a client boundary file, we only explicitly export individual fields in ESM (`export foo`) when the source type is `module`. However in most of the time SWC gives the `auto` source type. This PR improves the type detection a bit so if it's `auto` and we do see ESM exports collected, we assume it's ESM and re-export these fields. Fixes #41940, fix NEXT-796 ([link](https://linear.app/vercel/issue/NEXT-796)). --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
6 lines
101 B
JavaScript
6 lines
101 B
JavaScript
import * as Client from './client-index'
|
|
|
|
export default function Page() {
|
|
return <Client.Foo />
|
|
}
|