From a93fc2e73912ddc027ffba935a9220fdde11e7fa Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Wed, 27 Mar 2024 07:44:42 +0100 Subject: [PATCH] Merge pull request #26651 from storybookjs/yann/fix-tsconfig-paths-nextjs NextJS: Support path aliases when no base url is set (cherry picked from commit 44fc0b6aa18b802efc2ddee4f5532d57326625c7) --- code/frameworks/nextjs/src/imports/webpack.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/frameworks/nextjs/src/imports/webpack.ts b/code/frameworks/nextjs/src/imports/webpack.ts index 0b7a45b13bc8..57d837d0fdb2 100644 --- a/code/frameworks/nextjs/src/imports/webpack.ts +++ b/code/frameworks/nextjs/src/imports/webpack.ts @@ -11,8 +11,8 @@ export const configureImports = ({ }): void => { const configLoadResult = loadConfig(configDir); - if (configLoadResult.resultType === 'failed' || !configLoadResult.baseUrl) { - // either not a typescript project or tsconfig contains no baseUrl + if (configLoadResult.resultType === 'failed') { + // either not a typescript project or tsconfig is not found - we bail return; }