Skip to content

Commit

Permalink
Revert "Try fixing Storybook build"
Browse files Browse the repository at this point in the history
This reverts commit bebd725.
  • Loading branch information
Methuselah96 committed Dec 21, 2024
1 parent b21f77a commit 3aa69ce
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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'),
Expand All @@ -32,5 +33,4 @@ const config = {
},
staticDirs: ['../fonts'],
};

export default config;

0 comments on commit 3aa69ce

Please sign in to comment.