Fork me on GitHub
#shadow-cljs
<
2019-03-01
>
eoliphant02:03:41

hi, I’m trying to use the grommet react lib with shadow, and I’m running into some issues, getting a bunch of failed to load messages, (e.g. failed to load module$node_modules$grommet$components$Box$Box), in looking at the node_modules layout it ‘seems’ like it should be ok. For example, there’s a node_modules/grommet/components/Box/Box.js During the compile, there’s one info/warning [2019-02-28 21:06:26.501 - INFO] :shadow.build.npm/js-invalid-requires - {:resource-name "node_modules/grommet/components/hocs.js", :requires [{:line 41, :column 11}]} In hocs.js theres some node code, that return require(.. is line 41

if (process.env.NODE_ENV !== 'production') {
  doc = function doc(component) {
    return require("./" + component + "/doc").doc;
  }; // eslint-disable-line

}

richiardiandrea02:03:23

is there any docker image for shadow and lein that folks are using? I have found https://hub.docker.com/r/urbanslug/shadow-cljs but the link to github seems broken

idiomancy20:03:48

anyone happen to know if there would be a way of expressing this in shadow? (the first line, I mean):

global.WebSocket = require('ws');
require('es6-promise').polyfill();
require('isomorphic-fetch');

idiomancy20:03:01

that like, assignment to the global scope

thheller20:03:16

(set! js/goog.global.Thing ...)

idiomancy20:03:31

nice. thanks

thheller20:03:50

(:require ["ws" :as ws]) (set! js/goog.global.WebSocket ws)

idiomancy20:03:02

bloody compiler wizard, you are

wizard 20