diff --git a/code/frameworks/nextjs/src/compatibility/compatibility-map.ts b/code/frameworks/nextjs/src/compatibility/compatibility-map.ts index 96c8459e0fee..f423ee1db0fc 100644 --- a/code/frameworks/nextjs/src/compatibility/compatibility-map.ts +++ b/code/frameworks/nextjs/src/compatibility/compatibility-map.ts @@ -3,8 +3,12 @@ import semver from 'semver'; import { getNextjsVersion, addScopedAlias } from '../utils'; const mapping: Record> = { - '<14.0.0': { + '<14.1.0': { + // https://github.com/vercel/next.js/blob/v14.1.0/packages/next/src/shared/lib/segment.ts 'next/dist/shared/lib/segment': '@storybook/nextjs/dist/compatibility/segment.compat', + }, + '<14.0.4': { + // https://github.com/vercel/next.js/blob/v14.0.4/packages/next/src/client/components/redirect-status-code.ts 'next/dist/client/components/redirect-status-code': '@storybook/nextjs/dist/compatibility/redirect-status-code.compat', }, @@ -14,7 +18,7 @@ export const getCompatibilityAliases = () => { const version = getNextjsVersion(); const result: Record = {}; - Object.keys(mapping).filter((key) => { + Object.keys(mapping).forEach((key) => { if (semver.intersects(version, key)) { Object.assign(result, mapping[key]); }