Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make hot reloading work with Elm 0.19.1 #87

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

asterite
Copy link
Contributor

@asterite asterite commented Aug 9, 2019

This seems to solve the error I was getting on the JS console but now:

  • it says "Jetpack reloaded!" but the UI doesn't seem to get updated (I'm trying modifying a string literal)
  • jetpack will sometimes fail with:
    some_file.js.tmp: renameFile:renamePath:rename: does not exist (No such file or directory)
    

I'm almost sure getting hot reload to work is almost there.

src/HotReload.hs Outdated
@@ -24,7 +24,7 @@ wrap hotReloadingPort (a, content) =
[ "// Expose the Webpack HMR API"
, "var myDisposeCallback = function() {};"
, "// simulate the HMR api exposed by webpack"
, "var moduleHot = {"
, "var module = {"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried that something else is called module and we overwrite that.

Copy link
Contributor Author

@asterite asterite Aug 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stoeffel Great idea! I tried using moduleHot as before and now it seems to work! Well, it automatically reloads the page. I still get the renameFile error... but it's a big progress!

@rekahsoft rekahsoft added the hold label Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants