Fork me on GitHub
#shadow-cljs
<
2024-08-04
>
rafaeldelboni20:08:40

Hey after doing an npm upgradeon lib that is dependency of another lib I use changed the https://github.com/vfile/vfile/compare/6.0.1...6.0.2#diff-92bbac9a308cd5fcf9db165841f2d90ce981baddcb2b1e26cfff170929af3bd1L80-L81 to use #paths with https://nodejs.org/api/packages.html#packages_imports and I started getting this error:

shadow-cljs - config: /Users/rafael.delboni/Workspaces/clj/docs.frontend/shadow-cljs.edn
shadow-cljs - starting via "clojure"
[:ci-tests] Compiling ...
The required JS dependency "#minpath" is not available, it was required by "node_modules/vfile/lib/index.js".
Do you folks know if there is any way to support this on shadow?

thheller08:08:39

you can override it using the :resolve key I guess

thheller08:08:28

:resolve {"#minpath" {:target :npm :require "vfile/lib/minpath.browser.js"}} should work

rafaeldelboni13:08:51

Thanks ! I there a way to reuse :resolve between different builds like :app and :tests or I need to replicate this settings in each build ?

thheller13:08:31

that should work? :js-options {:resolve ...} in top level

rafaeldelboni13:08:16

top level don't work here, using inside build works fine (I'm at 2.28.11)