https://github.com/patoroco/parcel-hmr-with-python-example
Testing Hot Module Replacement with Parcel while the HTML is served by another server (python in this case)
https://github.com/patoroco/parcel-hmr-with-python-example
django example flask hmr hot-module-replacement js parcel python
Last synced: 20 days ago
JSON representation
Testing Hot Module Replacement with Parcel while the HTML is served by another server (python in this case)
- Host: GitHub
- URL: https://github.com/patoroco/parcel-hmr-with-python-example
- Owner: patoroco
- License: other
- Created: 2020-02-03T22:46:12.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-28T07:01:40.000Z (almost 5 years ago)
- Last Synced: 2024-04-20T17:44:05.797Z (about 2 years ago)
- Topics: django, example, flask, hmr, hot-module-replacement, js, parcel, python
- Language: HTML
- Size: 915 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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
```bash
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.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.