diff --git a/code/lib/core-common/src/utils/interpret-require.ts b/code/lib/core-common/src/utils/interpret-require.ts index 12304652f602..1f3d47d81993 100644 --- a/code/lib/core-common/src/utils/interpret-require.ts +++ b/code/lib/core-common/src/utils/interpret-require.ts @@ -14,6 +14,9 @@ export function interopRequireDefault(filePath: string) { target: `node${process.version.slice(1)}`, format: 'cjs', hookIgnoreNodeModules: true, + // Some frameworks, like Stylus, rely on the 'name' property of classes or functions + // https://github.com/storybookjs/storybook/issues/19049 + keepNames: true, tsconfigRaw: `{ "compilerOptions": { "strict": false,