mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 15:31:16 +08:00
21 lines
567 B
TypeScript
21 lines
567 B
TypeScript
import { isAbsolute, join } from 'node:path';
|
|
|
|
import { checkAddonOrder, serverRequire } from 'storybook/internal/common';
|
|
|
|
export const checkActionsLoaded = (configDir: string) => {
|
|
checkAddonOrder({
|
|
before: {
|
|
name: '@storybook/addon-actions',
|
|
inEssentials: true,
|
|
},
|
|
after: {
|
|
name: '@storybook/addon-interactions',
|
|
inEssentials: false,
|
|
},
|
|
configFile: isAbsolute(configDir)
|
|
? join(configDir, 'main')
|
|
: join(process.cwd(), configDir, 'main'),
|
|
getConfig: (configFile) => serverRequire(configFile),
|
|
});
|
|
};
|