graphql-engine/frontend/libs/console/legacy-ce/.storybook/main.js
Nicolas Beaussart 57e62c3d40 frontend: fix storybook not running
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7646
Co-authored-by: Nicolas Inchauspe <710410+nicoinch@users.noreply.github.com>
GitOrigin-RevId: cc26aff8d9241bfbec1c019da9f681ec62a76ea3
2023-01-24 17:17:33 +00:00

28 lines
693 B
JavaScript

const webpack = require('webpack');
const rootMain = require('../../../../.storybook/main');
module.exports = {
...rootMain,
core: { ...rootMain.core, builder: 'webpack5' },
staticDirs: ['../../../../static'],
stories: [
...rootMain.stories,
'../src/lib/**/*.stories.mdx',
'../src/lib/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [...rootMain.addons, '@nrwl/react/plugins/storybook'],
webpackFinal: async (config, { configType }) => {
// apply any global webpack configs that might have been specified in .storybook/main.js
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}
return config;
},
};