CleverCloud / clever-components

Collection of Web Components by Clever Cloud
https://www.clever-cloud.com/doc/clever-components/
Apache License 2.0
220 stars 19 forks source link

Storybook (dev server): refresh CEM when a component is updated #991

Closed florian-sanders-cc closed 6 months ago

florian-sanders-cc commented 6 months ago

Fixes #989

What does this PR do?

How to review?

Galimede commented 6 months ago

Note: if you modify a .d.ts type file, it wont trigger cem again. Still, if you wanted to then modify the doc of the related component after modifying the .d.ts, in hope that it would do the trick and reload cem, the type displayed will remain the same as before.

florian-sanders-cc commented 6 months ago

Note: if you modify a .d.ts type file, it wont trigger cem again. Still, if you wanted to then modify the doc of the related component after modifying the .d.ts, in hope that it would do the trick and reload cem, the type displayed will remain the same as before.

As discussed in sync, this issue was already present with older storybook version. The d.ts files are not actually seen as modules by the dev server so even if it detects a change, it does not trigger any refresh. I've tried to solve it with the same logic as the one used within this PR but this didn't workout: the fact that these files are not recognized as dependencies of other files is the main issue.

I'll open an issue to see what we can do in the future but I'll merge this PR as is in the meantime.

Thanks @Galimede for pointing this out and testing with me :sunglasses:

github-actions[bot] commented 6 months ago

🔎 The preview has been automatically deleted.