Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: addon-storysource doesn't display the full source #29478

Open
rajprashanthr opened this issue Oct 29, 2024 · 0 comments
Open

[Bug]: addon-storysource doesn't display the full source #29478

rajprashanthr opened this issue Oct 29, 2024 · 0 comments

Comments

@rajprashanthr
Copy link

Describe the bug

I am using storybook react of version v8.3.6 . I have added storysource addon to the react webpack storybook sample in stackblitz to test the display of story file's full source in the addons. I am not able to bring it up. It only brings up the 'code' tab in the addons and displays the rendered piece of code for that particular story

Please find my main.js file below

/** @type { import('@storybook/react-webpack5').StorybookConfig } */ const config = { stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], addons: [ "@storybook/addon-webpack5-compiler-swc", "@storybook/addon-onboarding", "@storybook/addon-links", "@storybook/addon-essentials", "@chromatic-com/storybook", "@storybook/addon-interactions", "@storybook/addon-storysource", ], framework: { name: "@storybook/react-webpack5", options: {}, }, }; export default config;

Reproduction link

https://stackblitz.com/edit/github-h25xa6?file=.storybook%2Fmain.ts

Reproduction steps

  1. In the stackblitz link , please note the addon-storysource being added to main.ts file's addons
  2. Though the code tab appears in the addons section, it doesn't display the story's source in it

System

npx [email protected] info
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported

Storybook Environment Info:

System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm <----- active
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
@storybook/addon-essentials: ^8.4.0-beta.1 => 8.4.0-beta.1
@storybook/addon-interactions: ^8.4.0-beta.1 => 8.4.0-beta.1
@storybook/addon-onboarding: ^8.4.0-beta.1 => 8.4.0-beta.1
@storybook/addon-storysource: 8.4.0-beta.1 => 8.4.0-beta.1
@storybook/addon-webpack5-compiler-swc: ^1.0.5 => 1.0.5
@storybook/blocks: ^8.4.0-beta.1 => 8.4.0-beta.1
@storybook/react: ^8.4.0-beta.1 => 8.4.0-beta.1
@storybook/react-webpack5: ^8.4.0-beta.1 => 8.4.0-beta.1
@storybook/test: ^8.4.0-beta.1 => 8.4.0-beta.1
storybook: ^8.4.0-beta.1 => 8.4.0-beta.1

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants