diff --git a/lib/core/src/client/preview/loadCsf.ts b/lib/core/src/client/preview/loadCsf.ts index fe7924dcea14..ee982cdb907f 100644 --- a/lib/core/src/client/preview/loadCsf.ts +++ b/lib/core/src/client/preview/loadCsf.ts @@ -40,7 +40,7 @@ const loadStories = ( fileExports, // todo discuss: types infer that this is RequireContext; no checks needed? // NOTE: turns out `babel-plugin-require-context-hook` doesn't implement this (yet) - typeof req.resolve === 'function' ? req.resolve(filename) : null + typeof req.resolve === 'function' ? req.resolve(filename) : filename ); } catch (error) { logger.warn(`Unexpected error: ${error}`);