Skip to content
Testing Hot Module Replacement with Parcel while the HTML is served by another server (python in this case)
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.

Parcel HMR Example

This is a small example about how to get Hot Module Replacement (HMR) working with Parcel while we're serving the index with another server (python3 http.server).

The purpose is to be able to use Parcel while we're developing with a web framework like Django or Flask, avoiding to lose the HMR feature.

Install & Run

npm install

# run the python webserver in a terminal
npm run web

# run the watch in another terminal to watch the changes in the `index.html` and `index.js` files
npm run watch

After that, you'll be able to open http://localhost:8000/ in a browser, and once you add some changes in the index.html or index.js, the hot reloading should work.


This project is licensed under the MIT License - see the file for details.

You can’t perform that action at this time.