Fork me on GitHub
#shadow-cljs
<
2018-08-11
>
cjmurphy09:08:51

If in JavaScript see import simplify from 'simplify-js'; then after npm install simplify-js working fine I ought to be able to require: ["simplify-js" :refer (simplify)] and look at simplify and it should not be undefined. Is that correct?

thheller09:08:55

import simplify .. is a default export. so it would be ["simplify-js" :default simplify].

thheller09:08:37

["simplify-js" :refer (simplify)] is equiv to import { simplify } from 'simplify-js';. note the extra {}. ES6 imports are weird.

cjmurphy09:08:59

Thanks again. Bookmarking that table now...

thheller09:08:35

see the section below about default exports

thheller09:08:53

the REPL is very useful for checking out how packages are actually structured

daviwil14:08:45

Ahhh, time to enjoy some weekend ClojureScript thanks to shadow-cljs 🙂

cljs 20