Fork me on GitHub
#shadow-cljs
<
2019-10-25
>
Heikki Hämäläinen10:10:40

Is there any way to get compilation warnings and node output to same terminal output? My current setup is to run in one terminal “shadow-cljs watch <target>” then in another “node <target>.js” and after that connect Cursive REPL to nrepl. This leads to situation where REPL output is in one window, node output (like logging) in one and compilation in one. Is there some way to redirect outputs to combined view somehow?

thheller10:10:55

@heikki.hamalainen currently that is not possible no. it sort of works if you run node-repl (without a build) via the Cursive nREPL

thheller10:10:08

so you run shadow-cljs server

thheller10:10:23

connect with cursive as usual and run (shadow/node-repl)

thheller10:10:35

but that is only a REPL, it doesn't watch

Heikki Hämäläinen10:10:29

Ok, watch is still needed so I will still continue to run multiple terminals. Thanks for the reply. I needed to check this out because I was thinking that perhaps I have misunderstood something.

thheller10:10:27

the issue is that I don't want to "hijack" the default node streams

thheller10:10:51

since you run node target.js separately I'd have to mess with process.stdout and process.stderr

thheller10:10:57

which I'm not really comfortable with 😛

thheller10:10:35

but the Inspect work I previewed yesterday is meant to address this in a different way anyways 😛

thheller10:10:13

so you wouldn't use prn or console.log for debugging output but tap> instead

thheller10:10:29

still doesn't end up in Cursive though 😉

Heikki Hämäläinen10:10:30

Yes, that looks promising. Should be easy to add tap> to timbre logging as a middleware.

thheller10:10:29

maybe. I don't use timbre so not really sure what it does.

Heikki Hämäläinen11:10:15

timbre is a logging library which is quite used in Clojure community: https://github.com/ptaoussanis/timbre

thheller11:10:43

yes I know what it is. but I don't know what it does internally to do what it does

thheller11:10:41

like what happens if you attempt to log a really large value?

p-himik13:10:14

Using :module-hash-names changes actual file names. I'm thinking how to handle the same issue with my CSS files. Another approach would be to add a dummy query parameter so I don't have to rename anything or create some convoluted logic on my web server. But changing actual file names is more robust and explicit as it's a 1-to-1 match (for practical reasons only, because MD5) to the actual code. Do you have any thoughts on how it should be handled with CSS? Do you any example source code that deals with this issue?

thheller13:10:27

I do but its part of my work code and hasn't been touched in 5 years or so

thheller13:10:42

not something I would want to share 😛

thheller13:10:43

I prefer changing the filename over the query parameter but query should be fine. many sites do that.

p-himik13:10:56

Yeah, understandably so, because it should be easy to implement. But it still leaves a possibility for nasty errors where "it works on my machine". OK, thanks anyway. I'll try to think of something not too outlandish. After all, It's already a mixed codebase where UI is in CLJS and the server is in Python. 🙂

thheller13:10:24

I used a ruby script since back then my backend was still ruby

thheller13:10:19

it just takes a bunch of css files. minifies them and renames with the hash. then writes a manifest.json which the server reads so it knows about the names

Filipe Silva14:10:21

@thheller I'm seeing some odd behaviour for :node-test targets on windows only

Filipe Silva14:10:00

the target looks like this:

{:e2e
      {:autorun true,
       :ns-regexp "e2e.*",
       :output-to "out/e2e.js",
       :target :node-test},

Filipe Silva14:10:14

on linux and macos it runs swell

Filipe Silva14:10:23

but on windows it runs twice

Filipe Silva14:10:53

and since this particular test interacts with the FS, one test interferes with the other

Filipe Silva15:10:35

I think it exits with the exit code of the first run, because the second one fails but the run does not fail

Filipe Silva15:10:51

I say it runs twice because the output looks like this:

Filipe Silva15:10:59

Run yarn e2e
yarn run v1.19.1
$ shadow-cljs compile e2e
shadow-cljs - config: D:\a\create-cljs-app\create-cljs-app\shadow-cljs.edn  cli version: 2.8.67  node: v12.13.0
shadow-cljs - connected to server

[:e2e] Compiling ...
========= Running Tests =======================

Testing e2e.core
shadow-cljs - socket connect failed, server process dead?
[:e2e] Compiling ...
========= Running Tests =======================

Testing e2e.core
rm: could not remove file (code EBUSY): test-app/node_modules/clj-kondo/unpacked_bin/clj-kondo.jar
rm: could not remove directory (code ENOTEMPTY): test-app/node_modules/clj-kondo/unpacked_bin
rm: could not remove directory (code ENOTEMPTY): test-app/node_modules/clj-kondo
rm: could not remove directory (code ENOTEMPTY): test-app/node_modules
rm: could not remove directory (code ENOTEMPTY): test-app

Filipe Silva15:10:57

I think I saw this happening only after I began using a background server via shadow-cljs start

thheller15:10:17

I thought the docs mention this.

thheller15:10:23

do not use :autorun

thheller15:10:32

I wish I never added it to begin with

thheller15:10:20

the output does indeed look weird but I'm not willing to look into anything that uses :autorun

thheller15:10:45

run shadow-cljs compile e2e && node out/e2e.js or so

thheller15:10:55

separate compilation from the actual running of the tests

Filipe Silva15:10:47

was the user guide the wrong place to look for this information? I usually use it as my main resource but it does say it is a WIP

thheller15:10:24

:autorun	
(boolean, optional) Run the tests via node when a build completes. This is mostly meant to be used in combination with watch. The node process exit code will not be returned as that would have to forcefully kill the running JVM.

thheller15:10:33

The node process exit code will be set to 0 when successful and 1 on any failures. (The node process exit code will not be returned when using :autorun.)

Filipe Silva15:10:28

ok I see now, I should not rely on the exit code

thheller15:10:38

you SHOULD rely on the exit code

thheller15:10:47

just not with :autorun

thheller15:10:55

just don't use it ... ever ...

Filipe Silva15:10:26

yes I meant with autorun 😄

thheller15:10:38

once compile finishes you can even shutdown shadow-cljs before running the tests. it won't be required for the actual tests

thheller15:10:33

this github CI thing looks nice. how do you like it so far?

Filipe Silva15:10:10

I like it a lot, but there are some nuances

Filipe Silva15:10:01

I like it because it's one of the only CIs that offers free Windows runs, which I believe are required for OSS to treat windows users as first class citizens

Filipe Silva15:10:26

the other one is azure pipelines, and tbh gh-actions is really just pipelines in the background

Filipe Silva15:10:49

it is not as fully featured as stuff like circleci

Filipe Silva15:10:30

it doesn't have cache right now, but I'm into their private feedback org and was told it it's one of the things they are working on right now

Filipe Silva15:10:38

integrations are top notch though

borkdude15:10:08

it also doesn't have ssh access like circleci

borkdude15:10:15

which has been essential for me when debugging a build

thheller15:10:46

guess I'll stick with circleci for now. works ok after all.

borkdude15:10:50

but it seems to be faster than circleci for e.g. graalvm builds (minus the caching issue)

Filipe Silva15:10:40

yeah ssh is missing too, but circleci is the only one with it so it's not really a common feature. although it's a super useful one, also saved me a bunch of times.

Filipe Silva15:10:09

I asked them about ssh once and they said it was on their radar, but no news so far

borkdude15:10:44

does gh actions also do Windows builds?

Filipe Silva15:10:16

I do ubuntu/osx/windows on it

borkdude15:10:37

I love that artifacts are downloadable on gh-actions, contrary to circleci

borkdude15:10:14

by anyone I mean

Filipe Silva15:10:38

I'm conflicted about that

Filipe Silva15:10:52

circleci has a way to make downloadable artifacts

Filipe Silva15:10:15

I used artifacts on that run as workspace files are used in circle

Filipe Silva15:10:33

which isn't great, I don't want people to download that single js file

Filipe Silva15:10:41

I just don't want to double build when not necessary

borkdude15:10:01

I have pasted a link to an artifact in circleci many times for people to preview something

borkdude15:10:18

instead I could just say "go look at the build for this commit and download the artifact"

Filipe Silva15:10:07

I'm a bit confused, I expect that to work

Filipe Silva15:10:55

@thheller what is the intended workflow for :node-test targets via watch, but without autorun? Is it to have some node watcher waiting to rerun the out file?

thheller15:10:39

depends on what you want. I typically don't want tests to run whenever I safe a file

thheller15:10:56

I mostly run tests in the REPL

thheller15:10:28

eg. you could create a keyboard shortcut REPL command that runs the tests on keypress via the REPL

Filipe Silva15:10:20

hm... trying to emulate the overall watch functionality for things like karma setups

Filipe Silva15:10:35

(although this isn't using karma and I don't want karma atm)

Filipe Silva15:10:21

for the target audience, I would prefer a single process that runs in the background

Filipe Silva15:10:36

yeah that or nodemon sounds like the best approach

thheller15:10:38

chokidar out/e2e.js -c "not out/e2e.js"

thheller15:10:53

you can use :autorun if you really need to, I just don't recommend it

thheller15:10:18

maybe I should add something like :autorun-in-watch-only true or so

👍 4
thheller15:10:30

so it doesn't attempt to :autorun with compile

Filipe Silva15:10:30

is it possible to override :autorun for the same target? e.g. shadow-cljs watch test --autorun or something

thheller15:10:52

shadow-cljs watch test --config-merge "{:autorun true}"

Filipe Silva15:10:29

if autorun isn't recommended for compile I think it makes a lot of sense to disable it it, or provide an alternate explicit flag

Filipe Silva15:10:44

thank you for explaining this to me

Filipe Silva15:10:56

I'll add these as defaults to my starter project:

"test": "shadow-cljs watch test --config-merge \"{:autorun true}\"",
    "test:once": "shadow-cljs compile test && node out/test.js",
    "e2e": "shadow-cljs compile e2e && node out/e2e.js",

thheller15:10:44

maybe use "test" and "test:watch"?

Filipe Silva15:10:10

I actually agree with that but it turns out it's surprising for a lot of the target audience

thheller15:10:11

at least my expectation is for test to do a test once

Filipe Silva15:10:39

in Angular CLI we flipped the meaning once and there was a lot of pushback

Filipe Silva15:10:41

certain communities have surprising expectations for defaults

thheller15:10:22

easy to get used to something like that I guess

Filipe Silva15:10:26

you know how e2e tests are by definition slow things that test a lot of stuff? a longstanding issue we've had is to have e2e watch mode

Filipe Silva15:10:34

which I cannot fathom anyone could truly want

Filipe Silva15:10:45

here we're event talking about e2e using protractor, which is slow and defaults to running in a visual mode

thheller15:10:23

yeah for me thats a problem with :autorun already

thheller15:10:40

not uncommon for a test for take a couple seconds

thheller15:10:21

especially build related stuff ... if that blocked the normal watch I'd be pretty annoyed

Filipe Silva15:10:00

yeah same here

martinklepsch15:10:53

I’m getting a couple of infer warnings for a library that I’m using httpurr: http://sprunge.us/dhCr7W — is this something that should be addressed at the library level or an issue with Shadow CLJS?

thheller16:10:52

neither I guess

thheller16:10:12

they can be renamed since they are from the closure library

thheller16:10:11

you could add typehints to make the warnings go away but they aren't required

martinklepsch16:10:15

right, but that’s kind of annoying, no? having to modify third party code to hide warnings that are false negatives…

thheller17:10:56

you shouldn't be getting warnings for third party code (in .jar files)

thheller17:10:13

I guess the problem is .gitlibs

thheller17:10:39

you can open an issue about those. since they are actually files they are treated as-if they are your project files

thheller17:10:56

so you get warnings, but probably shouldn't

martinklepsch19:10:27

Ah ok! That makes a lot of sense I’ll open an issue :)

rschmukler16:10:23

Hey all! Has anyone gotten refactor-nrepl working in a tools.deps project? I'm getting an error on cider startup that says:

WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.5.0-SNAPSHOT and n/a, respectively.
Looking at the jack in command:
[nREPL] Starting server via /usr/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.2 -d refactor-nrepl:2.5.0-SNAPSHOT -d cider/cider-nrepl:0.22.4 server
And I've even got them explicitly listed as dependencies:
refactor-nrepl              {:mvn/version "2.5.0-SNAPSHOT"}
    cider/cider-nrepl           {:mvn/version "0.22.4"}

rschmukler16:10:29

Any tips on where to go from here?

bbss16:10:57

do I need to do something to get babel to work with shadow-cljs? I'm trying to require a jsm module from three.js, but shadow-cljs is erroring with:

internal/modules/cjs/loader.js:775
    throw err;
    ^

Error: Cannot find module 'babel-core'
Require stack:
- /project/.shadow-cljs/babel-worker/babel-worker.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
    at Function.Module._load (internal/modules/cjs/loader.js:677:27)
    at Module.require (internal/modules/cjs/loader.js:830:19)
    at require (internal/modules/cjs/helpers.js:68:18)
...
...
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/project/.shadow-cljs/babel-worker/babel-worker.js'
  ]

thheller16:10:10

please don't cut stacktraces 😛

thheller16:10:24

did you try adding custom plugins/presets?

bbss16:10:00

I'm not using babel myself in this project.

thheller16:10:11

hmm not sure what that is about

thheller16:10:36

how do you require it?

bbss16:10:01

["three/examples/jsm/loaders/GLTFLoader" :refer [GLTFLoader]]

thheller16:10:06

where do you get this error?

bbss16:10:35

on my project build shadow-cljs watch main

thheller16:10:32

when or where?

thheller16:10:46

some log context helps a lot

thheller16:10:24

hmm thats a weird one

bbss16:10:41

The weird land of JS modules and transpilation..

thheller16:10:56

it is the babel package contained in shadow-cljs

thheller16:10:08

but I don't get why it would try to require("babel-core")

thheller16:10:57

certainly not at

at /Users/baruchberger/work/nursico/.shadow-cljs/babel-worker/babel-worker.js:399:229
    at Object.<anonymous> (/Users/baruchberger/work/nursico/.shadow-cljs/babel-worker/babel-worker.js:404:3)

thheller16:10:37

can you delete that file and restart shadow-cljs?

thheller16:10:45

maybe you have some old version for some reason?

bbss16:10:56

I tried deleting .shadow-cljs a couple times before

thheller16:10:11

hmm then this should be reproducible

thheller16:10:51

please open an issue. doing other stuff currently that I want to finish first

bbss16:10:58

alright, let me set-up a reproduce case tomorrow

bbss16:10:09

will do, thanks!

richiardiandrea17:10:36

might an old question, today I bumped my shadow and I get:

shadow-cljs - starting via "clojure"
Exception in thread "main" java.io.FileNotFoundException: Could not locate shadow/cljs/devtools/cli__init.class, shadow/cljs/devtools/cli.clj or shadow/cljs/devtools/cli.cljc on classpath.
	at clojure.lang.RT.load(RT.java:466)
	at clojure.lang.RT.load(RT.java:428)
...

thheller17:10:20

missing thheller/shadow-cljs dep in deps.edn

thheller17:10:24

it is no longer auto injected

richiardiandrea17:10:53

oh this was through cider master, does it mean that has to change too?

richiardiandrea17:10:21

(well should cider auto-inject is not maybe a q for you I know :D)

thheller17:10:22

not sure what you mean

thheller17:10:34

cider still injects itself so that should still work

thheller17:10:59

shadow-cljs just doesn't because that was causing more annoying issues than actually helping

lilactown17:10:12

@richiardiandrea if you add shadow-cljs as a dep it will fix it

tekacs17:10:11

This is the issue I’m running into (it’s less pleasant with a lot going on). I’m hoping it’s something well known that folks have run into, since IDEA project debugging can run on for a very long time.

thheller17:10:31

@tekacs Cursive doesn't support js/

tekacs17:10:44

😂 thank you :)

tekacs17:10:14

I have relatively little use for it, so I guess I’ll just keep them to few places and not worry about it :)

davewo17:10:31

I am looking to run shadow-cljs behind a reverse proxy (to develop w/ https locally). Is it possible to allow shadow to have the app connect to shadow's websocket on a proxy port (say 9640) but still listen for the WS on 9630?

davewo17:10:11

I see the SSL config guidance in the documentation, but hoping to be able to just configure SSL once on my proxy

thheller17:10:28

@davewo see :devtools-url in the docs

thanks 4
mruzekw18:10:49

Is there a good template / general wisdom for keeping a frontend CLJS along-side a CLJ backend app in the same repo?

mruzekw18:10:27

I kind of want to have a hard separation where shadow-cljs is used in frontend/ and lein in backend/

mruzekw18:10:00

But I’ve also seen something like src/main/clj and src/main/cljs

thheller19:10:02

i recommend using your namespaces to separate stuff. I usually have src/main/my/company/frontend/app.cljs or so with a src/main/my/company/server.clj

thheller19:10:43

:source-paths works but IMHO gets annoying as soon as you have code that you want to use on both platforms

mruzekw19:10:09

And I just might

papachan12:10:54

this week i tried this one lein new reagent <project name> +shadow-cljs from lein. and it worked pretty well. it run a backend and also compile cljs to javascript with shadow-cljs. Now i include Karma to the project and suprisely it run fine!

David Reno18:10:23

I’m struggling a bit with Spacemacs/Cider and shadow-cljs. I see https://shadow-cljs.github.io/docs/UsersGuide.html#cider but it’s not helping. Is there any kind of procedure to follow to ensure that each step is complete? I’m thinking of something like this: 1. run java -v and verify version > 8 2. run node -v and verify version > 6 3. do <this thing> to make sure your paths are set correctly 4. run npx shadow-cljs init 5. edit shadow-cljs.edn and set :source-paths to values <something> 6. verify configuration by doing <this smart thing> 7. start emacs, open shadow-cljs.edn 8. start the n-repl and connect from cider by running M-x cider-jack-in-cljs 9. everything else… Looking for something that’s going to stop me before I go to far without having the basics correct.

dpsutton18:10:40

@dcreno ignore cider until everything works on the command line. Then it should hopefully run in CIDER just fine

David Reno19:10:03

I think it does but I’ll run through it one more time.

David Reno19:10:52

npx create-cljs-project t2 works fine and creates a skeleton directory. npx shadow-cljs node-repl starts and produces a working (seeming) REPL and a web-page available on .

dpsutton19:10:43

perfect. now do cider-jack-in-cljs and it should work. and node your-script.js or whatever to have the runtime

David Reno19:10:54

From *Messages*

[nREPL] Starting server via /usr/local/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.0 -d cider/cider-nrepl:0.22.0-SNAPSHOT server...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: env: node: No such file or directory

David Reno19:10:25

and

error in process sentinel: Could not start nREPL server: env: node: No such file or directory

dpsutton19:10:56

that's emacs saying it has no idea what node is

dpsutton19:10:16

same as if node wasn't on your path for your terminal

David Reno19:10:42

I vaguely remember installing node and seeing that it wanted me to set PATH a certain way, sure I didn’t. May need to uninstall/reinstall and read better.

dpsutton19:10:56

that might not be necessary

David Reno19:10:09

➜  ~ which node
/Users/dreno200/n/bin/node

David Reno19:10:20

➜  ~ node --version
v10.17.0

dpsutton19:10:46

look at exec-path that's emac's path. you need to add node to the emacs path in the same way you do it for shells

David Reno19:10:03

(getenv PATH) doesn’t show /Users/dreno200/n/bin, working on finding right zsh file to add it to…

dpsutton19:10:14

you can call directly (add-to-list 'exec-path "/Users/dreno200/n/bin")

David Reno19:10:00

yeah, used setenv to put it in the path and got this now:

[yas] Prepared just-in-time loading of snippets successfully.
Loading /Users/dreno200/.emacs.d/.cache/company-statistics-cache.el (source)...done
[nREPL] Starting server via /usr/local/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.0 -d cider/cider-nrepl:0.22.0-SNAPSHOT server...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: shadow-cljs - config: /Users/dreno200/Documents/dev/t2/shadow-cljs.edn  cli version: 2.8.67  node: v10.17.0
shadow-cljs - connected to server
server already running

 [2 times]
error in process sentinel: Could not start nREPL server: shadow-cljs - config: /Users/dreno200/Documents/dev/t2/shadow-cljs.edn  cli version: 2.8.67  node: v10.17.0
shadow-cljs - connected to server
server already running
Will need to play with it a bit.

dpsutton19:10:56

> server already running

dpsutton19:10:08

its already started and they are fighting over the port

David Reno19:10:28

Maybe I should have stopped the CLI first.

David Reno20:10:05

shutdown npx shadow-cljs node-repl from CLI, now getting this in *Messages*:

error in process sentinel: Could not start nREPL server: shadow-cljs - config: /Users/dreno200/Documents/dev/t2/shadow-cljs.edn  cli version: 2.8.67  node: v10.17.0
===== ERROR =================
Executable 'java' not found on system path.
=============================
However, I java is in /usr/bin:
➜  t2 which java
/usr/bin/java
➜  t2 java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
➜  t2
and I have it set in emacs as the first item in the PATH environment variable with (setenv). Seems to clearly be a path problem though.

dpsutton20:10:46

there's a package https://github.com/purcell/exec-path-from-shell which might be helpful for you

David Reno20:10:26

yeah, that just seems so much easier, but then again, I only use emacs for Clojure and Scheme.

David Reno21:10:37

progress: spacemacs PATH is set by PATH environment variable in .spacemacs.env. Even though it’s documented to append multiple PATH statements, it seems it was somehow confused. By reducing the statements to one and shortening, I got the right path in there (i.e. one with node and java). Now when running cider-jack-in-cljs it seems to work by prompting for a REPL type (I chose node), and starting a browser window pointing to . *Messages*:

[nREPL] Starting server via /usr/local/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.0 -d cider/cider-nrepl:0.22.0-SNAPSHOT server...
[nREPL] server started on 50825
[nREPL] Establishing direct connection to localhost:50825 ...
[nREPL] Direct connection to localhost:50825 established
Visit '' in a browser? (y or n) y
helm: Error: Trying to run helm within a running helm session
Quit [3 times]
I’ll try to find a shadow-cljs troubleshooting doc and a place where I can add advice about verifying that node and java are in the path as reported by (getenv PATH). Thanks for your help!

dpsutton21:10:20

are both your front end and backend run through shadow?

David Reno21:10:41

I don’t even know what that means.

David Reno21:10:00

I’m trying to use shadow for everything because it seems well thought out.

dpsutton21:10:16

ok. so both front end and back end are shadow-cljs

dpsutton21:10:29

don't choose node then. choose shadow-cljs and then choose the build

David Reno21:10:41

ok, I’ll start it again.

David Reno21:10:44

shadow choices are shadow or shadow-select.

dpsutton21:10:06

choose shadow

dpsutton21:10:39

and there's gonna be two different choices. the first is what repl you want. there you are gonna choose shadow-cljs. the next will be which shadow build do you want. and you want to choose whatever you named your backend build

dpsutton21:10:46

in your shadow-cljs.edn file

David Reno21:10:55

ah, and then it prompts for build and suggests dev which I suppose corresponds to whatever is in the shadow-cljs.edn file.

David Reno21:10:49

are there docs about this because I am not seeing anything like this anywhere. Certainly appreciate your help but don’t want to be a drag.

dpsutton21:10:05

the first choice is from CIDER. you need to say which repl you are using. if its figwheel, figwheel-main, shadow-cljs. unfortunately cljs tooling is a bit all over the map. but you're doing shadow-cljs and its a great product and that's what you say there all the time

dpsutton21:10:42

the second choice is from shadow but CIDER is asking for you. from the docs of shadow, when you run npx shadow-cljs watch [build] this choice is asking you which shadow build you want to run

David Reno21:10:58

seem to have it working now, can eval within spacemacs and see the little green bars on the left of the s-exps as I eval them.

dpsutton21:10:15

outstanding!

dpsutton21:10:22

welcome to the cljs community

David Reno21:10:25

thanks again for sticking with me.

dpsutton21:10:58

when you have shadow questions ask in #shadow-cljs and any CIDER related questions, from absolute beginner to how to modify and submit a patch come to #cider

👍 8
currentoor23:10:52

Is there a way to change the import statements in a JS dependency? I want to use react-native-base (UI kit) in both a web page and mobile app, by swapping our "react-native" with "react-native-web" Here’s how the react native base docs suggest doing it with webpack https://github.com/GeekyAnts/NativeBase-KitchenSink/tree/web-support#to-create-new-react-app