Open liuxian496 opened 8 months ago
I change ”storybook/addon-coverage“ to version 0.0.9. The "DevTools"(chrome) worked correctly.
I tried downgrading to 0.0.8. I still have issues with incorrect sourcemaps. I'm using Webcomponents+vite. If I remove the addon, sourcemap is correct.
Same with storybook/addon-coverage 1.0.1, storybook 8.0.0 and vite. My current workaround is to remove coverage on storybook dev
// in package.json scripts
"storybook": "VITE_COVERAGE=false storybook dev -p 6006",
I upgrade storybook to the v8.0.4, and the 『@storybook/addon-coverage』 version is "1.0.1", the problem is still not solved. Changed "storybook/addon-coverage“ to version 0.0.9 is not worked in storybook v8.0.4.
I upgrade the project with vite, the "DevTools"(chrome) worked correctly. Storybook is 8.0.4. 『@storybook/addon-coverage』 version is "1.0.1". ![Uploading new.jpg…]()
In my case, with Storybook 8 and @storybook/addon-coverage@1.0.3
I had to change configuration as pointed in the README:
{
name: '@storybook/addon-coverage',
options: {
istanbul: {
// Fixes https://github.com/storybookjs/addon-coverage/issues/35
include: ['**/stories/**'],
},
},
},
After adding it, now sourcemaps are showing up correctly in devtools.
EDIT: nevermind, this actually breaks code coverage collection completely.
This was fixed for me with https://github.com/storybookjs/addon-coverage/releases/tag/v1.0.4 version.
Describe the bug
I upgrade Storybook to "7.6.4 ", then "DevTools"(Chrome)can not load source maps correctly. I created a new project try to reappear.
This is “man.ts”![main](https://github.com/storybookjs/storybook/assets/20082670/928afcca-ab41-42f9-b6cc-862f996b4311)
` import type { StorybookConfig } from "@storybook/react-webpack5";
const config: StorybookConfig = { stories: ["../src/*/.mdx", "../src/*/.stories.@(js|jsx|mjs|ts|tsx)"], addons: [ "@storybook/addon-links", "@storybook/addon-essentials", "@storybook/preset-create-react-app", "@storybook/addon-onboarding", "@storybook/addon-interactions", // '@storybook/addon-coverage' ], framework: { name: "@storybook/react-webpack5", options: { builder: { useSWC: true, }, }, }, docs: { autodocs: "tag", }, staticDirs: ["../public"], }; export default config;
`
The “name” component is used by Button component.
To Reproduce
No response
System
Additional context
No response