Fork me on GitHub
Gleb Posobin06:02:29

How do I set web-accessible-resources with shadow for chrome-extension target? I want to include a content script css file.


you put it into the manifest?

👍 4
Gleb Posobin15:02:31

Wow, that worked, thank you.


@UQ4RJ22EA Im having the same problem and I tried putting it into the manifest.edn but it didn't work. The manifext.json was malformed I had tried:

:content-scripts [{:css ["re-frame-modal.css"]}]
:content-scripts {:css ["re-frame-modal.css"]}
neither produced manifest.json that was accepted by chrome extension loading. I could manually set the manifest.json and that would work. Could you show me what you put in the manifest.edn to get the css file to be accepted? Thanks

Gleb Posobin17:02:05

:web-accessible-resources ["assets/content-style.css"]
:content-scripts [{:css ["assets/content-style.css"] :matches ["<all_urls>"]}]


Thank you that worked great!


has anyone had success importing react-dnd? my build fails when i require the necessary packages

["react-dnd" :refer [DragDropContext DropTarget DragSource DragLayer]]
with the following build failure
[:app] Build failure:
The required JS dependency "domain" is not available, it was required by "node_modules/@react-dnd/asap/dist/cjs/node/raw.js".

Search in:
You probably need to run:
  npm install domain
i've also manually added domain yarn add domain and tried to require it directly with the same error message as above


@joshkh you need to install shadow-cljs in the project


not sure how i missed that. thanks @thheller, that did the trick


I just started getting an error about a CLJC file not finding itself to import macros from:

Failed reading cache for theta.log: failed to require macro-ns "theta.log", it was required by "theta.log"
The file is like:
(ns theta.log
  #?(:cljs (:require-macros [theta.log]))
This just started. Is this a cache problem?


oh, removing the caches helped uncover an error in a macro that was hidden by the cache fail error