1.1.0-beta.1
Note: If you use elm-watch together with run-pty, make sure to update run-pty to 4.0.2 or later!
- Added: An opt-in error overlay in the browser, with clickable error locations. When elm-watch’s browser UI shows “🚨 Compilation error”, click the UI to expand it and then click the “Show errors” button. That opens an overlay which shows the compilation errors. The overlay is visible until you close it again, or until you fix all errors. elm-watch remembers your choice to show errors in the browser per target, and opens the overlay again when there are new errors if you had previously opted to show it. Cool detail: The overlay uses the color theme from your terminal if possible! (That’s why run-pty needs to be updated – to support extracting the colors.)
- Added: Buttons for moving the browser UI to another corner. If you’ve ever felt that the elm-watch browser UI was in the way, you can now move it to another corner. The position is remembered per target across page reloads.
- Added: Support for running elm-watch in a Web Worker. Web Workers have no DOM, so you won’t get elm-watch’s browser UI. Instead, elm-watch gives you updates through browser console logs.
- Added: Better support for HTTPS.
- Fixed: Catch syntax errors when hot reloading.
- Fixed: On the iPhone, if the phone locks while elm-watch is waiting for compilation to finish, the elm-watch browser UI used to be stuck in the “⏳ Waiting for compilation” state. Now, the browser UI should always update when coming back to the page.
- Fixed: Various edge cases around “elm.json related errors”.
- Improved: If you accidentally run your dev server with HTTP caching, elm-watch no longer gets stuck in a reload loop and instead shows you a helpful error message.
- Fixed: If you rename a target after you have opened it in the browser, elm-watch no longer gets stuck in a weird state. elm-watch used to just complain about target names not matching up, and the only way to fix it was to remove the output JavaScript file. Now the error message tells you to reload the page, and once you do it starts working again with the new target name.
- Improved: Elm can crash while printing JSON. If you run into such an Elm bug, elm-watch output is now easier to understand: It mentions that “Elm crashed” and shows Elm’s crash message, rather than text about the JSON unexpectedly being cut off.
- Improved: The error message for when window.Elm is undefined.
Install the latest beta:
npm install elm-watch@beta
Or install this version specifically:
npm install [email protected]
Install latest run-pty (if you use it):
npm install run-pty@latest