Skip to content
purescript hot module replacement setup for spago build system
Shell HTML JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Pure HMR

This is a nifty little executable script that will quickly get a minimal hot reloading Purescript project going.

This runs the spago build system, as well as the parcel bundler. support for other build systems is in our roadmap.

This also assumes that your entry point is index.html. Flexible entry points are also in our roadmap

Props to justinwoo -


  1. Global dependancies

You must have the purescript compiler installed, as well as:

npm i -g parcel spago

You must have inotifywatch installed - in linux:

sudo apt install inotify-tools
  1. Usage:

Copy the following files into your project directory.

./index.html ./index.js

If you're in an established project and you have an existing entry point, you may need to merge your existing code into these files, maintaining the import statement and script tag.

now run:


Happy Hacking!

Roadmap Features

  • allow the user to provide the build script as an argument

  • allow the user to specify an entry point and watch folder.

You can’t perform that action at this time.