Fork me on GitHub
#shadow-cljs
<
2022-02-05
>
shivekkhurana13:02:32

I'm trying to patch a js dependency in node_modules folder. Is it possible to make shadow-cljs reload when changes are made to dist files of a package in node_modules ?

thheller15:02:01

@shivekkhurana you can touch node_modules/that-package/package.json to make shadow-cljs reload it

👍 1
shivekkhurana15:02:21

I found this solution in the history. Someone asked this question on 2019.

shivekkhurana04:02:09

I found a hacky way to live reload node_modules folder on change. I have added the package path to :paths in config. And instead of using it as @pkg/name is use it as /@pkg/name . This forces shadow to treat it as source code and perform HMR on change.

thheller06:02:37

that is a terrible idea. do not do that 😛

shivekkhurana13:02:00

lol I just do that in dev mode, and then turn it back to @pkg/name (drop the /).