run --continuous doesnt seem to behave any differe...
# javascript
s
run --continuous doesnt seem to behave any differently
đź§µ 1
t
If you are on multiplatform then jsBrowserRun --continuous
s
That kind of works, it refreshes the browser but it's always one iteration behind. So Hello World change to Hello World 2, browser refreshes shows Hello World, change to Hello World 3 and save, browser refreshes and shows Hello World 2
I've just noticed fritz2 getting started template for RC6 is 1.7.20, let me try upping it to 1.9.0
Upgrading 1.9.0 mp gets closer. Refreshes twice now but the 2nd refresh (which happens about 1 seconds after first) does have the latest change
All seems very fragile tbh but I'll keep exploring
t
For me the second refresh works all the time, except if there is an error in the code.
s
Any idea why it does 2 refreshes per change?
t
Not really, I guess it's a Kotlin + NPM thing. But that's how it worked for years.
s
Okay, thanks for your help!
g
The refresh is always slower than in pure JS, because the project has to be compiled by the kotlin compiler, that produces the js-code that then is taken by webpack. I don’t think it is fragile – it is just slower.
s
Why does it do it twice?
r
I believe the twice is caused by the webpack watcher noticing some kind of change in the filesystem before kotlin has finished compiling out its new JS files. Never tracked down exactly what it is, but it could be something as simple as cleaning a directory