ReactLibraries / storybook-addon-module-mock

Provides module mocking functionality like jest.mock on Storybook.
MIT License
42 stars 5 forks source link

Try to upgrade to non-deprecated APIs #14

Closed shilman closed 9 months ago

shilman commented 9 months ago

Hello! Storybook maintainer here! 👋

This addon uses APIs that are deprecated in SB7.x and will be removed in 8.0. I've attempted to upgrade to the modern APIs here so that the addon will be compatible with SB8 once it's released.

Based on local testing with https://github.com/shilman/storybook-rsc-demo upgraded to 8.0.0-alpha.11, the change is successful for dev mode, but not for prod. Any chance you might be able to pick up this work and figure out the build step?

Also if you expose /manager and /preview from your package.json exports map, you should be able to remove the managerEntries and previewAnnotations from the addon presets, which will clean things up a little bit.