mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This PR fixes a bug where Next.js would not use the serverComponentsExternalPackages config when opting into the `experimental.bundlePagesExternals` flag. The fix consists of just adding a check for the externals config.
20 lines
296 B
JavaScript
20 lines
296 B
JavaScript
import { foo } from 'external-package'
|
|
import { bar } from 'opted-out-external-package'
|
|
export async function getServerSideProps() {
|
|
return {
|
|
props: {
|
|
foo,
|
|
bar,
|
|
},
|
|
}
|
|
}
|
|
|
|
export default function Index({ foo }) {
|
|
return (
|
|
<div>
|
|
{foo}
|
|
{bar}
|
|
</div>
|
|
)
|
|
}
|