Files
Jimmy LaiandGitHub 82d1b57721 misc: fix serverComponentsExternalPackages usage for experimental.bundlePagesExternals (#57954)
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.
2023-11-02 23:57:52 +00:00

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>
)
}