Revert "Try fixing Storybook build"

This reverts commit bebd725aef.
This commit is contained in:
Nathan Bierema 2024-12-21 11:43:14 -05:00
parent b21f77a9b4
commit 3aa69ce1ef

View File

@ -1,14 +1,15 @@
import type { StorybookConfig } from '@storybook/react-webpack5';
import { join, dirname } from 'path';
/**
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
function getAbsolutePath(value) {
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
const config = {
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
getAbsolutePath('@storybook/addon-webpack5-compiler-swc'),
@ -32,5 +33,4 @@ const config = {
},
staticDirs: ['../fonts'],
};
export default config;