diff --git a/code/frameworks/nextjs/src/preset.ts b/code/frameworks/nextjs/src/preset.ts index 2833d9c5752f..e776296a9155 100644 --- a/code/frameworks/nextjs/src/preset.ts +++ b/code/frameworks/nextjs/src/preset.ts @@ -68,6 +68,14 @@ export const config: StorybookConfig['previewAnnotations'] = (entry = []) => [ require.resolve('@storybook/nextjs/preview.js'), ]; +export const env = (envConfig: PresetProperty<'env', StorybookConfig>) => { + return { + ...envConfig, + // Can be removed after https://github.com/vercel/next.js/issues/42621 is resolved + __NEXT_NEW_LINK_BEHAVIOR: 'true', + }; +}; + // Not even sb init - automigrate - running dev // You're using a version of Nextjs prior to v10, which is unsupported by this framework.