diff --git a/code/frameworks/nextjs/src/preset.ts b/code/frameworks/nextjs/src/preset.ts index 4f54465d5c8a..24b2c3ee46d9 100644 --- a/code/frameworks/nextjs/src/preset.ts +++ b/code/frameworks/nextjs/src/preset.ts @@ -152,7 +152,7 @@ export const webpackFinal: StorybookConfig['webpackFinal'] = async (baseConfig, const isNext14orNewer = semver.gte(nextjsVersion, '14.0.0'); const useSWC = - isNext14orNewer && (nextConfig.experimental?.forceSwcTransforms ?? !hasBabelConfig); + isNext14orNewer && (nextConfig.experimental?.forceSwcTransforms || !hasBabelConfig); configureNextFont(baseConfig, useSWC); configureRuntimeNextjsVersionResolution(baseConfig);