Anyone used :npm-deps ? trying to use three.js but it does not appear to work for me
{:deps {org.clojure/clojure {:mvn/version "1.10.0"}
org.clojure/clojurescript {:mvn/version "1.10.773"}
rum {:mvn/version "0.12.3"}
cljsjs/three {:mvn/version "0.1.01-1"}
doughamil/threeagent {:mvn/version "0.0.6"}
com.bhauman/figwheel-main {:mvn/version "0.2.11"}
}
:npm-deps {:three "0.120.1"}}
I thought all i needed todo was add :npm-deps to my deps.edn but the details on this are a bit sparse 😕that doesn't go in deps.edn
I think that goes in the build.edn file? https://clojurescript.org/guides/webpack
I will try that, never created a build.edn file before usually create figwheel-main.edn dev.cljs.edn and deps.edn for a project will look into it and see if that works
build.edn looks very similar to my dev.cljs.edn file I noticed does one have precedent over the other or is it one or the other
@oliver.marks you have Three as a dep in your deps.edn, you don't shouldn't need :npm-deps
if you have that already
That was my first stab, it all stems from doughamil/threeagent which fails because three.js does not exists it has suggestions for lein and shadow-clj https://github.com/DougHamil/threeagent but as I am using neither I am looking for a way to make it available
been using native clojurescripts libraries and I have noticed a tendency for others to use shadow-clj when it comes to npm
Hi Guys
Looking for some :target :bundle
help
% webpack --progress resources/public/js/index.js -o resources/public/js/app.js
92% chunk asset optimization TerserPlugin
Takes about 10 mins on my laptop!
If I use the TerserPlugin and set compress: false
it improves to a few seconds.
Presumably caused by chewing on the advanced build output.
Are there recommended webpack settings to avoid pointless "compress the compressed file" slowness?
(or I might be guessing at the wrong cause)
I'll stick my https://gist.github.com/olivergeorge/aa3b7dd8d8826b595bcca293cac6c3bc in a gist.