figwheel-main

figwheel-main http://figwheel.org
bhauman 2020-06-17T13:15:28.299600Z

@juhoteperi thanks 🙂

2020-06-17T15:34:41.301700Z

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?

bhauman 2020-06-17T15:37:27.302900Z

https://www.npmjs.com/package/react-highlight.js

bhauman 2020-06-17T15:37:44.303500Z

the actual library is called react-highligh.js

bhauman 2020-06-17T15:37:53.303800Z

I think you are importing the wrong one

bhauman 2020-06-17T15:38:15.304100Z

I mean npm installing the wrong one

2020-06-17T15:39:08.305500Z

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

bhauman 2020-06-17T15:39:22.306Z

yes it is confusing

2020-06-17T15:39:35.306400Z

It auto added in the declared deps from the library

2020-06-17T15:40:30.307300Z

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

bhauman 2020-06-17T15:41:20.307700Z

oh yeah they are requiring the right one

bhauman 2020-06-17T15:42:24.308300Z

isn’t re-frame10x a dev time tool?

bhauman 2020-06-17T15:42:51.308700Z

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

bhauman 2020-06-17T15:43:57.309600Z

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

bhauman 2020-06-17T15:44:52.311100Z

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

2020-06-17T15:44:53.311300Z

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 =)…

bhauman 2020-06-17T15:45:20.312Z

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

2020-06-17T15:45:43.312500Z

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

bhauman 2020-06-17T15:46:24.313Z

I don’t see why it wouldn’t

bhauman 2020-06-17T15:46:53.313600Z

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

bhauman 2020-06-17T15:47:12.314300Z

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

2020-06-17T15:47:26.314800Z

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

2020-06-17T15:47:48.315600Z

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

bhauman 2020-06-17T15:47:58.316Z

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

2020-06-17T15:48:22.316700Z

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

bhauman 2020-06-17T15:48:32.317100Z

oh thanks

bhauman 2020-06-17T15:48:45.317700Z

what platform are you on?

2020-06-17T15:48:48.317800Z

So is there no way to load resources then?

bhauman 2020-06-17T15:49:03.318400Z

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

2020-06-17T15:49:07.318500Z

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

bhauman 2020-06-17T15:50:15.319500Z

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

bhauman 2020-06-17T15:50:46.320500Z

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

2020-06-17T15:51:00.321Z

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

bhauman 2020-06-17T15:51:05.321200Z

no need to test that yet

bhauman 2020-06-17T15:52:06.322500Z

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

2020-06-17T15:52:36.323Z

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

bhauman 2020-06-17T15:53:34.324Z

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

1
2020-06-17T16:10:18.325700Z

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?

bhauman 2020-06-17T16:11:09.326100Z

@folcon yeah this may be a bug in cljs

bhauman 2020-06-17T16:11:31.326500Z

you’ve found a few already

🙂 1