Skip to content

Commit

Permalink
Merge pull request #22486 from youngboy/fix-esbuild-keepnames
Browse files Browse the repository at this point in the history
Core: Improve compatibility, do not mangle `names` in `interpret-requires` with `esbuild`
  • Loading branch information
ndelangen committed Jun 21, 2023
2 parents 3899b2b + d5204c7 commit 5021c4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/lib/core-common/src/utils/interpret-require.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5021c4f

Please sign in to comment.