Open kwshi opened 2 years ago
The docs say that the --hot
flag only works when outputting a js file, so you'll want to pass --output
to elm make
like elm-live --hot -- --output=main.js src/Main.elm
.
You'll also want to set up an HTML file that will load the compiled js. See the --output
docs and the js interop section in the guide for an example HTML file.
Running a basic elm project created from scratch with
elm init
and a singlesrc/Main.elm
with the following contents:Expecting to see a page with just the text "hello world". This works correctly when I run
elm-live src/Main.elm
, but it doesn't work when I runelm-live --hot -- src/Main.elm
: instead I get a blank page with nothing showing, and the console shows amyDisposeCallback is not a function
error after ~10 seconds or so:Versions: tested on 4.0.0, 4.0.0-rc.1 (
@next
as of writing), 4.0.1, 4.0.2. Same results all around.Seems related to https://github.com/wking-io/elm-live/issues/211, (I know @codesections was having the same error message); however, that thread was closed as "fixed" without much/any explanation for how the fix was made. The one suggestion about bumping
elm-hot
dependency version from 1.1.1 to 1.1.4 does not seem to help-- 4.0.2 already useselm-hot@1.1.4
(by inspecting installed lock file) and still has this issue.