I canβt seem to get it to work
for cljs namespaces, that is
@tony.kay for CLJS its :build-options {:ns-aliases {a b}}
. eg. https://github.com/day8/re-frame-debux#option-2-namespace-aliases-with-shadow-cljs
hi everybody! is there a way to specify general :exclusions in shadow-cljs.edn like there is in lein?
@jpmonettas exactly like in lein, :dependencies [[some-dep "version" :exclusions [foo]]
yeah but is there a general :exclusions, like this one https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L89-L92
that is not supported. what are you trying to exclude? I mean its rather uncommon to get an unwanted dep from multiple sources?
I'm working on a project where a bunch of our libraries depend on mount. For one of the projects that uses all those, I want to work with a fork of mount I made, so I want to exclude all mount dependencies everywhere since I want to provide the one to use. Does it make sense?
I'm in the process of migrating this project to shadow-cljs, and the current project is using that lein functionality
@jpmonettas are you using deps.edn
? Because you can create an alias with :override-deps
to point to your fork; and then pull in the deps via alias in shadow.
help π how do i express this:
import Select, { components } from 'react-select';
in this:
(ns yep
(:require ["react-select" :default react-select]
["react-select/async" :default react-select-async]))
I also need to import Option
from "react-select"
somehow@pithyless I don't think :override-deps
works since they are different artifacts, not different versions, I'm including district0x/mount
and want to exclude mount
since the both contains the same namespaces
This would work if you reference the git repo:
{mount {:git/url "<https://github.com/district0x/mount>" :sha ...}}
(But you would need to add a deps.edn
to your forked repo)I wonder if you can specify an alternative mvn root... {:mvn/version "..." :mvn/artifact ...}
Looks like the groupId/artifactId stuff is hardcoded for :mvn; but that forked git repo would work.
yeah not sure what to do, I think I'll just add exclusions per dependency, but is kind of error prone, if I miss one then I'll have some hard to track bugs
thanks for your ideas !!
Hiya, I am getting this error when I try to run my tests:
Resource: com/cognitect/transit.js:649:8
variable module is undeclared
--------------------------------------------------------------------------------
nil
========= Running Tests =======================
internal/modules/cjs/loader.js:968
throw err;
^
Error: Cannot find module 'xmlhttprequest'
Any pointers on how to fix this?
npm install xmlhttprequest
? Guess you are using :node-test
and a library that does a require("xmlhttprequest")
somewhere?
I am using shadow-cljs compile test.
I added a dependency to use cljs-ajax
https://github.com/JulianBirch/cljs-ajax/blob/master/src/ajax/xml_http_request.cljs#L35
so yeah npm install xmlhttprequest
should fix it
thanks
@robert-stuttaford see the translation table at https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages (:require ["react-select" :as react-select :default Select :refer (Option)])
or so