Skip to content

Commit

Permalink
fix: Got you, stop removing the whole line and remove `export default…
Browse files Browse the repository at this point in the history
…` instead
  • Loading branch information
xeho91 committed May 25, 2024
1 parent c05ca61 commit eb7eb40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformer/create-appendix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export function createAppendix({
const { stories } = storiesFileMeta;
const { defineMetaVar } = nodes;
const parsedStoriesVariable = '__parsed';
const exportsOrderVariable = '__exports';
const exportsOrderVariable = '__namedExportsOrder';

// NOTE:
// We need to remove the default export from the code,
// because Storybook internally expects export default `meta`
code.replace(/export default .*\n/, '');
code.replace(/export default/, '');

const exportsOrder = Object.entries(stories).map(([id, _]) => id);
// biome-ignore format: Stop
Expand Down

0 comments on commit eb7eb40

Please sign in to comment.