npm install
npm run start
The website is available at http://127.0.0.1:8080/
After the page has loaded, edit app/App.tsx
to verify that HMR is working as expected.
The example includes quite a few elements, however, in order to replicate React compatible HMR, you only need to:
- Add
HotModuleReplacementPlugin
Webpack plugin - Add
ReactRefreshWebpackPlugin
Webpack plugin - Add
ReactRefreshTypeScript
TypeScript transform - Add
fastify-webpack-hot/client
Webpack entry script