clojurescript-amplified icon indicating copy to clipboard operation
clojurescript-amplified copied to clipboard

[WIP] Update Storybook to 7.5

Open madis opened this issue 2 years ago • 2 comments

Also updates shadow-cljs to get the ES6 modules support, as Storybook needs it (https://storybook.js.org/docs/react/api/csf)

The compilation results in ES6 default export, but during loading, not sure if due to webpack or storybook, there's the following error: image

At the same time the compiled JS ends with these lines: image

And the updated shadow-cljs.edn :stories target compiles to the default export as explained by Thomas Heller in https://clojureverse.org/t/generating-es-modules-browser-deno/6116

I'm not sure if it'd be possible to solve it currently with shadow-cljs configuration options. But as Clojure is flexible and hacks possible, I'm sure it'd doable somehow.

Hopefully someone with more knowledge can advise, help appreciated!

madis avatar Nov 23 '23 20:11 madis

Thank you for contributing to this repo @madis! ⭐ Much appreciated, since I haven't touched the code here myself in a while. 👏

Do I understand it correctly that it yet isn't ready for merging? If so, would you consider making it into a Draft Pull Request meanwhile?

DavidVujic avatar Nov 24 '23 07:11 DavidVujic

Thank you for contributing to this repo @madis! ⭐ Much appreciated, since I haven't touched the code here myself in a while. 👏

Do I understand it correctly that it yet isn't ready for merging? If so, would you consider making it into a Draft Pull Request meanwhile?

Yes, converted it into a draft.

I'll try couple more approaches to get to the bottom of this error - the default export not being an object. Though when I imported the namespace in the shadow-cljs app and after assigning it to window.somethingToInspect and inspecting it, it was an object with the necessary property component. As I'm not familiary what happens to the compiled JS after webpack & storybook start using it (I'm a webpack & storybook n00b), it complicates things a bit.

Any help greatly appreciated! I'd really like to start using Storybooks in my CLJS development cycle.

madis avatar Nov 24 '23 19:11 madis