graphql-engine/frontend/libs/console/legacy-ce/.storybook/main.ts
Nicolas Beaussart f3951e1680 frontend: update nx to latest 15
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8079
Co-authored-by: Stefano Magni <173663+NoriSte@users.noreply.github.com>
GitOrigin-RevId: 46b1ed03ab225fccc9d769203d1af11a6bcdb63e
2023-02-28 19:42:51 +00:00

34 lines
801 B
TypeScript

import type { StorybookConfig } from '@storybook/core-common';
import { Configuration } from 'webpack';
import rootMain from '../../../../.storybook/main';
const config: StorybookConfig = {
...rootMain,
core: { ...rootMain.core, builder: 'webpack5' },
staticDirs: ['../../../../static'],
stories: [
'../src/lib/**/*.stories.mdx',
'../src/lib/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
'@storybook/addon-essentials',
...rootMain.addons,
'@nrwl/react/plugins/storybook',
],
webpackFinal: async (config: Configuration) => {
// apply any global webpack configs that might have been specified in .storybook/main.ts
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config);
}
return config;
},
};
export default config;