Fork me on GitHub
#cljs-dev
<
2017-09-26
>
Roman Liutikov21:09:19

Is it supported to refer to a var in a scoped NPM package by its fully qualified name?

Roman Liutikov22:09:06

(require '["@scope/package" :as p])

(p/myFun) ;; this works

;; but how do I do this?
(@scope/package/myFun)

anmonteiro22:09:45

@roman01la not supported why do you need it

Roman Liutikov22:09:39

was going to put it in a macro

anmonteiro22:09:59

@roman01la you can use the alias name

Roman Liutikov22:09:31

this means explicit require whenever the macro is applied

anmonteiro22:09:17

if it’s a macro, poke into (:js-module-index @cljs.env/*compiler*)

anmonteiro22:09:31

and find the actual module name

anmonteiro22:09:55

which should look like module$Users$foo$project$node_modules$modulename$

Roman Liutikov22:09:07

it is, going to check this, thanks