Fork me on GitHub
#figwheel-main
<
2018-09-24
>
slipset13:09:29

Seems like you beat me to it, thanks 🙂

benzap14:09:43

I'm looking to use :npm config option in figwheel.main, but it says this might be removed in the future. What is likely to replace it in the future?

bhauman14:09:29

@benzap you shouldn’t worry about it being removed

bhauman14:09:48

I’m just leaving wiggle room for something better to come along

benzap14:09:04

ah ok, that's good to hear

bhauman14:09:08

it works quite well and I’m happy with it for now

benzap14:09:42

My only issue is how do I define my index.js file for it to work with node?

benzap14:09:26

for the browser it tacks the objects onto js/window

bhauman14:09:43

yeah this doesn’t work for node yet

bhauman14:09:55

I need to think about that

benzap14:09:00

hmm bummer

bhauman14:09:11

yeah but this isn’t a problem on node

benzap14:09:13

I started making two separate webpack configs, with target: "node"

benzap14:09:22

for the second one

benzap14:09:35

but now i'm stuck on the index_server.js file

bhauman14:09:40

But you can consume the libraries directly on node

bhauman14:09:52

(js/require

benzap14:09:01

yeah, you're right!

benzap14:09:08

ok, this should work

benzap14:09:21

and I guess I really only need to focus on frontend with webpack then, that simplifies things

bhauman14:09:28

just install them with npm or yarn and you are good to go

shaun-mahood15:09:30

@bhauman It appears that all the things that weren't working for me were end of week problems, with a fresh brain they all work today. Thanks again for the help!

😂 4
👍 4
bhauman16:09:04

@benzap I do think I should support Node with :npm :bundles just have to think about it a bit more

benzap16:09:02

that's cool, looking forward to it. I'll use js/require in the meantime

richiardiandrea17:09:48

I was always told that there is no need for bundling for node, because of CommonJS I guess

richiardiandrea17:09:46

and to be honest I have had only one issue, now fixed, upstream (the node-postgres dep)

bhauman21:09:17

yeah agree with that but I could see that if you are sharing libs with Node it might be nice to require node modules in the same way