Fork me on GitHub
#clojurescript
<
2023-08-30
>
M00:08:22

Anyone used https://github.com/LikaloLLC/tourguide.js with shaddow-cljs / npm / no webpack? I can not for the life of me figure out how to get it to import. The readme looks like it should be imported like ["tourguidejs" :as Tourguide]. Ive also tried ["tourguidejs" :refer Tourguide] and ["tourguidejs"] . The compiler doesn't complain about any of them, but Tourguide ends up undefined in everycase.

Sam Ferrell00:08:30

I was able to get it to work with this ["tourguidejs/tourguide.esm.js$default" :as Tourguide]

Sam Ferrell00:08:10

I'm not certain thats the best way to require it with shadow-cljs but it might work until you find a better solution

Nazral06:08:11

@U05DDT80258 have you tried ["tourguidejs" :default Tourguide] ?

M15:08:02

["tourguidejs/tourguide.esm.js$default" :as Tourguide] worked!! thanks you!

M16:08:46

Or with :default notation: ["tourguidejs/tourguide.esm.js" :default Tourguide]

🎉 2
Nazral16:08:53

out of curiosity, with the default notation, just "tourguidejs" doesn't work ?

M18:08:44

It needs to specifically find the esm version. So yes, but with shaddow it wasn't detecting the esm version without doing it manually.

👍 2
M18:08:57

Side note shepherd.js turned out to be a better lib. There are a couple settings it doesn't do by default, but once I got those sorted out it works better.