mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-11 08:42:22 +03:00
Try fixing Storybook build
This commit is contained in:
parent
2002a81071
commit
bebd725aef
|
@ -1,15 +1,14 @@
|
||||||
import type { StorybookConfig } from '@storybook/react-webpack5';
|
|
||||||
|
|
||||||
import { join, dirname } from 'path';
|
import { join, dirname } from 'path';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to resolve the absolute path of a package.
|
* 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.
|
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
|
||||||
*/
|
*/
|
||||||
function getAbsolutePath(value: string): any {
|
function getAbsolutePath(value) {
|
||||||
return dirname(require.resolve(join(value, 'package.json')));
|
return dirname(require.resolve(join(value, 'package.json')));
|
||||||
}
|
}
|
||||||
const config: StorybookConfig = {
|
|
||||||
|
const config = {
|
||||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||||
addons: [
|
addons: [
|
||||||
getAbsolutePath('@storybook/addon-webpack5-compiler-swc'),
|
getAbsolutePath('@storybook/addon-webpack5-compiler-swc'),
|
||||||
|
@ -33,4 +32,5 @@ const config: StorybookConfig = {
|
||||||
},
|
},
|
||||||
staticDirs: ['../fonts'],
|
staticDirs: ['../fonts'],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
Loading…
Reference in New Issue
Block a user