├── .gitignore ├── hello.js ├── README.md ├── index.js ├── index.html ├── webpack.config.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json -------------------------------------------------------------------------------- /hello.js: -------------------------------------------------------------------------------- 1 | const hello = () => 'hello world nice' 2 | export default hello -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # a minimum and pure example of **webpack hot module replacement** -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import hello from './hello.js' 2 | const div = document.createElement('div') 3 | div.innerHTML = hello() 4 | 5 | document.body.appendChild(div) 6 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |