ni / nimble

The NI Nimble Design System
https://nimble.ni.dev
MIT License
32 stars 8 forks source link

Cannot set breakpoints within storybook stories #2066

Closed mollykreis closed 2 months ago

mollykreis commented 5 months ago

🧹 Tech Debt

After storybook was moved to its own package, you can no longer set breakpoints within the storybook files (e.g. button.stories.ts). Setting breakpoints within a component's source does work correctly while running storybook.

m-akinc commented 5 months ago

I synced back to a commit from the end of February, and I still see the same behavior, i.e. <component>.stories.ts does not show up in debugger (only <component>-tests-<component>-stories.iframe.bundle.js) and attempting to put a breakpoint on the equivalent lines in the bundle file results in the message Could not load content for webpack://ni/nimble-components/ (Fetch through target failed: Unsupported URL scheme; Fallback: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME).

Given that it wasn't a simple configuration problem introduced when moving to the new storybook package (or even necessarily a regression), I'm going to stop my investigation here.

fredvisser commented 5 months ago

I assume these are related? – https://github.com/storybookjs/storybook/issues/26954 & https://github.com/storybookjs/storybook/issues/26653

valentinpalkovic commented 4 months ago

@fredvisser Could you please try out the canary release of Storybook 0.0.0-pr-27171-sha-f81ba26a for testing purposes and let me know whether it fixes your issues related to source maps? Related PR: https://github.com/storybookjs/storybook/pull/27171

If you're using @storybook/addon-coverage please also update it to use the following canary release: 1.0.4--canary.42.041aa23.0. Related PR: https://github.com/storybookjs/addon-coverage/pull/42

fredvisser commented 4 months ago

@valentinpalkovic - It looks like the Storybook canary release works well - thanks!

(We aren't using @storybook/addon-coverage, so we didn't test that one).

m-akinc commented 4 months ago

Storybook 8.2.0 should contain the fix. Check their releases to see if it has been released yet.

valentinpalkovic commented 2 months ago

The release of 8.2.0 is planned for this week!