From be4d0a211331fc00a8f6805191651814fb3cefc7 Mon Sep 17 00:00:00 2001 From: Sergio Vanacloig Date: Tue, 3 Oct 2023 11:46:55 +0200 Subject: [PATCH] Remove extra lines and use es modules in main.js --- .storybook/main.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index e4b6fa0f8..b4e47c391 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,15 +1,17 @@ import { dirname, join } from 'path'; -module.exports = { - stories: ['../malty/!(icons)/!(IconWrapper)/*.stories.@(mdx|js|jsx|ts|tsx)'], +function getAbsolutePath(value) { + return dirname(require.resolve(join(value, 'package.json'))); +} +export default { + stories: ['../malty/!(icons)/!(IconWrapper)/*.stories.@(mdx|js|jsx|ts|tsx)'], addons: [ { name: '@storybook/addon-links', name: '@storybook/addon-essentials' } ], - typescript: { check: false, checkOptions: {}, @@ -19,9 +21,7 @@ module.exports = { propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true) } }, - staticDirs: [{ from: '../public/storybook', to: '/' }], - previewHead: (head) => ` ${head} `, - framework: { name: getAbsolutePath('@storybook/react-webpack5'), options: {} }, - docs: { autodocs: true } }; - -function getAbsolutePath(value) { - return dirname(require.resolve(join(value, 'package.json'))); -}