atanasster / storybook-addon-deps

A storybook addon to add a dependencies tree exporer tab.

Home Page:https://atanasster.github.io/storybook-addon-deps/?path=/docs/design-system-avatarlist--short

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need help to make the addon work

Eplumecocq opened this issue · comments

commented

Hi,
thank you for your addon !

I probably miss something, but I actually can't make the addon work. No error are displayed but my dependencies table is always empty.


package.json

"react": ">=16.8.0",
"react-dom": ">=16.8.0"
"typescript": "^4.1.2"
"@storybook/react": "^6.3.4"
"@storybook/preset-create-react-app": "^3.2.0"
 "@storybook/addon-essentials": "^6.3.4"
 "@storybook/addon-links": "^6.3.4"
 "@storybook/addon-storyshots": "^6.3.4"
 "storybook-addon-deps": "^2.2.0"

.storybook/main.js

module.exports = {
  stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
  addons: [
    '@storybook/addon-links',
    '@storybook/addon-essentials',
    '@storybook/preset-create-react-app',
    'storybook-addon-deps/preset',
  ],
};

.storybook/preview.js

import { DocsPage } from 'storybook-addon-deps/blocks/DocsPage';

export const parameters = {
  actions: { argTypesRegex: '^on[A-Z].*' },
  controls: {
    matchers: {
      color: /(background|color)$/i,
      date: /Date$/,
    },
  },
  layout: 'centered',
  docs: { page: DocsPage },
};

I have three components, a Button, a Loader, and a ButtonLoader rendering those two components. I expect to see my button and my loader as dependencies of ButtonLoader, but I got :

2021-07-15_10h40_54

Any help would be very appreciated.

Thx

@Eplumecocq - sorry really cant have a good guess, usually its something with the webpack build process.

Do you have a repo I can try ?

commented

Hello,
I have the same issue with displaying dependencies in Docs. It did not work on the main project and I decided to try that addon on the very basic configured project. The result was the same. Maybe that could be caused by the addon incompatibility with the latest version of storybook?
Thanks