@juhoteperi: are there any tools to deal with packages which do var React = require('react');
?
I think in most cases such packages can be compiled using browserify or such to "normal" JS
Usually packages provide some kind of build task to build browser compatible files
Also, ClojureScript has some support for converting CommonJS modules to Closure modules, but I don't know if that is yet usable and what would that require from other packages
yeah, I'm not sure how to enable it...
this react-input-mask has 'require' inside of a build file 😞
:module-type :commonjs
on deps.cljs
But I don't know how it is supposed to map require calls to closure modules
hm, I should try doing this somehow maybe...
Looks like react-input-mask only uses babel to compile ES6 to ES5 CommonJS module
A simple fix might be to remove the line with require call, React
should already be available globally when you have :requires ["cljsjs.react"]
on deps.cljs
"remove the line" you mean just read the file, skip the line, write it back?
Something like it. Some package tasks are using regex to replace some parts of files.
cool, thanks
ah, replace-content, I see
Yeah it's provided by boot-cljsjs
@juhoteperi: sorry for submitting previous takes, I should've checked better 😮