What problem does it solve?
Editing UI component source files in packages/ui/src/lib/ has no effect in Storybook because imports resolve through the package exports map to the prebuilt dist/ directory, forcing slow manual rebuilds during component development.
Core Features & Use Cases
- Apply the HMR patch: Adds a file watcher to
storybook/vite.config.js that rebuilds @podman-desktop/ui-svelte and triggers a full reload whenever UI source files change.
- Revert safely: Restores the original
storybook/vite.config.js before committing, since the patch must never enter git history.
- Patch regeneration: Provides instructions to recreate the patch when upstream changes cause it to fail, including a 3-way merge fallback.
- Use Case: While modernizing a Svelte component in the UI package, apply the patch once and see every source edit reflected in Storybook automatically instead of rebuilding the package by hand.
Quick Start
Apply the Storybook HMR patch so my UI component changes hot reload, then restart Storybook.