squint

Kaka 2025-07-08T23:44:20.332179Z

Hey, I am trying to use #html to generate importmap :

(str #html [:script {:type "importmap"}
            (js/JSON.stringify {"imports" {"squint-cljs" ""}})])

=> "<script type=\"importmap\">{&quot;imports\":{\"squint-cljs\":\"\"}}</script>"
The output escaped first \" . How can I have something like h/raw to generate importmap with #html?

✅ 1
borkdude 2025-07-09T04:21:33.909589Z

Use :$ as the tag name. If that doesnt work please file an issue

Kaka 2025-07-09T06:37:57.824809Z

Thanks. I am not sure I understand the :$ correctly by setting it like:

(str #html [:$ {:type "importmap"}
            (js/JSON.stringify {"imports" {"squint-cljs" ""}})])

=> "<$ type=\"importmap\">{&quot;imports\":{\"squint-cljs\":\"\"}}</$>"
The result replaced script with $.

borkdude 2025-07-09T06:40:52.166249Z

Yeah sorry I need to implement this still. Issue welcome!

Kaka 2025-07-09T06:53:29.765649Z

Created https://github.com/squint-cljs/squint/issues/681.

👍 1