shadow-cljs-devcards icon indicating copy to clipboard operation
shadow-cljs-devcards copied to clipboard

using on shadow 2.19.3

Open henryw374 opened this issue 2 years ago • 0 comments

Hi,

I don't actually use this template but had my own similar setup.

FYI On upgrading to shadow 2.19.3 I found 2 problems.

  1. devcards do not get rendered . that is bc this fn does not return true https://github.com/bhauman/devcards/blob/master/src/devcards/util/utils.clj#L4 even with compiler opts :devcards true. fix I have for now is to rebind that fn to always return true.

  2. highlight.js npm not being successfully parsed. the reason is that index.js in highlight lib loads all the languages and one of them isbl it has problems with.

a fix is to add following config.

{:js-options {:resolve {"highlight.js" {:target :file :file "node_modules/hightlight.js/lib/core.js"}}}}

That will mean clojure highlighting is not enabled or working though, as by just loading core.js, no languages are registered as they would be in index.js. so... I guess you can also require the languages/clojure.js file and call (.registerLanguage highlight "clojure" clojure.js-file-required) . not tried that last bit yet.

henryw374 avatar Jun 14 '22 15:06 henryw374