File tree 1 file changed +9
-4
lines changed
packages/viewer/.storybook
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change
1
+ import { dirname , join } from 'path' ;
1
2
import type { StorybookConfig } from '@storybook/react-vite' ;
2
3
3
4
const config : StorybookConfig = {
4
5
stories : [ '../src/**/*.@(mdx|stories.@(js|jsx|ts|tsx))' ] ,
5
6
addons : [
6
- '@storybook/addon-essentials' ,
7
- '@storybook/addon-interactions' ,
8
- 'storybook-addon-deep-controls' ,
7
+ getAbsolutePath ( '@storybook/addon-essentials' ) ,
8
+ getAbsolutePath ( '@storybook/addon-interactions' ) ,
9
+ getAbsolutePath ( 'storybook-addon-deep-controls' ) ,
9
10
] ,
10
11
framework : {
11
- name : '@storybook/react-vite' ,
12
+ name : getAbsolutePath ( '@storybook/react-vite' ) ,
12
13
options : {
13
14
builder : {
14
15
viteConfigPath : 'vite.config.ts' ,
@@ -22,3 +23,7 @@ export default config;
22
23
// To customize your Vite configuration you can use the viteFinal field.
23
24
// Check https://storybook.js.org/docs/react/builders/vite#configuration
24
25
// and https://nx.dev/recipes/storybook/custom-builder-configs
26
+
27
+ function getAbsolutePath ( value : string ) : string {
28
+ return dirname ( require . resolve ( join ( value , 'package.json' ) ) ) ;
29
+ }
You can’t perform that action at this time.
0 commit comments