mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 16:11:33 +08:00
Core: use __orderedExports if provided to support source order in es module imports
This commit is contained in:
parent
06673e7069
commit
844c371e05
@ -379,7 +379,10 @@ export default function start(render, { decorateStory } = {}) {
|
||||
);
|
||||
}
|
||||
|
||||
const { default: meta, ...exports } = fileExports;
|
||||
const { default: meta, __orderedExports, ...namedExports } = fileExports;
|
||||
// prefer a user/loader provided `__orderedExports` object if supplied as es module exports
|
||||
// are ordered alphabetically - see https://github.com/storybookjs/storybook/issues/9136
|
||||
const exports = __orderedExports || namedExports;
|
||||
const {
|
||||
title: kindName,
|
||||
id: componentId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user