HMR
abernier opened this issue · comments
Describe the feature you'd like:
Currently, with sb6 (with webpack5 builder), as @vis-prime has reported each time a Storybook control is changed, the whole scene is re-rendered, without HRM:
WARNING: Too many active WebGL contexts. Oldest context will be lost. THREE.WebGLRenderer: Context Lost.
@CodyJasonBennett suggested 2 options:
- implementing https://vitejs.dev/guide/api-hmr.html#hmr-api
- creating a custom canvas and using that globally so it never unmounts/disposes of the actual canvas/context
Suggested implementation:
Regarding those 2 options:
- requires Storybook vite builder which is available in v6, but since sb7 will be vite-based by default, we should rather wait for v7
- is still an option