Fork me on GitHub
#figwheel-main
<
2020-05-15
>
raspasov08:05:37

@bhauman thank you! Just upgraded my React Native project, seems to work well

raspasov08:05:22

@bhauman I created this one-line pull request for react-native-figwheel-bridge https://github.com/bhauman/react-native-figwheel-bridge/pull/9

ingesol12:05:35

@bhauman Hi! I just tested :auto-testing with :bundle . Seems to be using the pre-webpack file, getting this: <script type="text/javascript">import {npmDeps} from "./npm_deps.js"; in the browser. Is it broken/not fixed yet, or is there something I should do to fix my config?

bhauman13:05:28

@ingesol yeah autotest doesn’t work

bhauman13:05:12

there is a pretty hard design problem for us here

bhauman13:05:06

I relied on having the :output-to being the file to load for auto-testing, but now we dont’ know the name of the final output file because its generated by webpack

bhauman13:05:37

so auto-testing, and the default index page that hosts the repl, no longer work

bhauman13:05:09

I’d love some feedback from folks on an approach to fixing this

bhauman13:05:29

I think adding yet another configuration key like :final-output-file seems like it would work, but it would be nice if there was a better idea

ingesol14:05:55

@bhauman cljs-test-runner with doo has the same problem. I forked it to do something similar to your :final-output-file. Don’t have any better ideas right now

bhauman14:05:02

extra-mains doesn’t work right now, but it will once I allow the bundle-cmd

bhauman14:05:02

@ingesol well we might end up with final-output-file

ingesol14:05:06

You couldn’t possibly know where the file is, unless you parse webpack.config.js or if there’s a convention on where the file final file is. Is file naming conventions an option?

ingesol14:05:50

so if bundle is target, look for this specific file, if it isn’t there then fall back to more verbose config?

bhauman14:05:13

yeah its tough, and we’ll probably end up with this :final-output-file, a convention for the final file is interesting

ingesol14:05:59

@bhauman Don’t know what’s out there, our configs tend to be relatively homogenous with files mostly ending up in the same place with the same name.

bhauman14:05:33

well I can get extra-mains working for now at least

ingesol14:05:43

@bhauman with convention, you mean, or with final-output-file?

bhauman14:05:16

extra-mains doesn’t need that because you make the html host page

bhauman14:05:30

so you know where the output-file is

bhauman14:05:47

its only when we need to include it automatically

bhauman14:05:50

actually thats not true!

bhauman14:05:09

@ingesol I’m wrong about that, extra-mains needs the output-file as well

bhauman14:05:53

but folks can make their own host pages for auto-testing and extra-mains

bhauman14:05:27

So if you wanted auto-testing to work right now you should be bale to do that

ingesol14:05:31

I’m guessing most people prefer the generated pages for things like testing and devcards?

ingesol14:05:41

Right, by just making my own copy of host page?

bhauman14:05:44

I think so

ingesol14:05:55

nice, I can test that right awy

bhauman14:05:16

oh but the bundle-cmd is wrong!

ingesol14:05:16

I tested latest bundle figwheel on our relatively large project, seems to work fine, by the way

bhauman14:05:40

I mean that is great!!

bhauman14:05:01

dang it, the bundle-cmd is going to be wrong for auto-testing

bhauman14:05:31

its going to use you webpack.config and write over your

ingesol14:05:37

I’m confused. Isn’t the webpack-processed main.js the same file (almost) that was our final target file before target=bundle was introduced?

bhauman14:05:23

yes pretty similar, but with extra-mains and auto-testing the bundle-cmd is going to be called at the end of compile

bhauman14:05:49

In other words autotesting needs to be bundled, but doen’t currently know how to do that

bhauman14:05:11

so it will fall back the current :bundle-cmd which is wrong

bhauman16:05:02

anyway I’m working on it now :extra-mains right now and its not simple

ingesol20:05:43

So worst case a separate webpack config file for testing?

dominicm22:05:31

Using :bundle, I'm not seeing code reloading work. With errors like Error: Namespace "com.commsor.membership_management.ui.members" already declared. (this is the ns I changed) ending with the .main ns.

dominicm22:05:55

So, code reloading takes place. But it doesn't reload any code. If I reload the tab, the code is updated.