Fork me on GitHub
#figwheel-main
<
2020-06-17
>
bhauman13:06:28

@juhoteperi thanks 🙂

folcon15:06:41

I thought we weren’t supposed to use this style of import?

["react-highlight.js" :as react-highlightjs]
Also been thinking about looking at react-native specifically the microsoft stuff, would that be a good stress test of the new figwheel-main webpack?

bhauman15:06:44

the actual library is called react-highligh.js

bhauman15:06:53

I think you are importing the wrong one

bhauman15:06:15

I mean npm installing the wrong one

folcon15:06:08

This is super confusing, as this exists too: (https://www.npmjs.com/package/react-highlight) I’m not importing anything specifically, just used :npm-deps true

bhauman15:06:22

yes it is confusing

folcon15:06:35

It auto added in the declared deps from the library

folcon15:06:30

I just looked at lein deps :tree and excluded the cljsjs/react-highlight dep because I remembered that happened the last time…

bhauman15:06:20

oh yeah they are requiring the right one

bhauman15:06:24

isn’t re-frame10x a dev time tool?

bhauman15:06:51

@folcon if so you don’t have to exclude cljsjs/react-highlight

bhauman15:06:57

@folcon I’m planning on adding support for react-native next month

bhauman15:06:52

but until then you can use react-native-figwheel-bridge with figwheel-main

folcon15:06:53

Yep, I stopped when it broke, but I thought I’d report it just in case it was a symptom of an underlying issue, I mean in this case it’s ok it’s not a prod dep, but it could easily have been =)…

bhauman15:06:20

yeah it could be the caching issue, would have to track it down

folcon15:06:43

Would that work with this: https://microsoft.github.io/react-native-windows/ The main targets I care about are OS’s not mobiles…

bhauman15:06:24

I don’t see why it wouldn’t

bhauman15:06:53

but there is a steepish learning curve to all of this as usual

bhauman15:06:12

reading the docs for react-native-figwheel-bridge is a good introduction

folcon15:06:26

That’s fine, I’m happy to be the user that hits walls 😉…

folcon15:06:48

Pave the way for other people to build cool things in the ecosystem ^_^…

bhauman15:06:58

react-native-figwheel-bridge doesn’t currently let you require images/pngs etc in the clojurescript codebase

folcon15:06:22

Loving what’s happening with the tooling btw, it’s great to see all the stuff that’s been added in!

bhauman15:06:45

what platform are you on?

folcon15:06:48

So is there no way to load resources then?

bhauman15:06:03

there is a way you’ll see when you read the docs

folcon15:06:07

I’ve got a windows machine and a macos, I primarily dev in macos, but I can test against both…

bhauman15:06:15

@folcon that’s cool, do you mind if I hit you up for some testing on windows sometime?

bhauman15:06:46

I just did a commit that handles the fact that npx is npx.cmd on windows

folcon15:06:00

No problem =)… Happy to help as and when I have time, just drop me a message and I’ll respond when I can 😉

bhauman15:06:05

no need to test that yet

bhauman15:06:06

but also the new SSL stuff would be nice to get my certifiable library working on windows

folcon15:06:36

My pet project is doing some gamedev, so making sure this stuff just works with media is something I really want to see =)…

bhauman15:06:34

cool well the work is scheduled to start in a couple of weeks to get react-native integrated including support for images

3
folcon16:06:18

Btw, this is the error if I do [day8.re-frame/re-frame-10x "0.6.5" :exclusions [cljsjs/react-highlight]]:

[Figwheel] Failed to compile build dev in 145.833 seconds.
[Figwheel:WARNING] Compile Exception   resources/public/js/compiled/out/day8/re_frame_10x/view/components.cljs   line:11  column:15

  No such namespace: react-highlight.js, could not locate react_highlight/js.cljs, react_highlight/js.cljc, or JavaScript source providing "react-highlight.js" (Please check that namespaces with dashes use underscores in the ClojureScript file name) in file resources/public/js/compiled/out/day8/re_frame_10x/view/components.cljs
Which reminds me I was performing clean manually in my run script, now need to see if I can just call the figwheel's clean… With regards to caching at the moment I delete all of my node_modules as well as my complied code before running npm install and then compiling from scratch. I absolutely want to ensure reproducible builds while this is being worked on. Not sure where else this could be caching unless I’ve gotten everything?

bhauman16:06:09

@folcon yeah this may be a bug in cljs

bhauman16:06:31

you’ve found a few already

🙂 3