Skip to content

Latest commit

 

History

History

react

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

TypeScript, Fastify, Webpack, React HRM example

Start

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.

Setup

The example includes quite a few elements, however, in order to replicate React compatible HMR, you only need to:

  1. Add HotModuleReplacementPlugin Webpack plugin
  2. Add ReactRefreshWebpackPlugin Webpack plugin
  3. Add ReactRefreshTypeScript TypeScript transform
  4. Add fastify-webpack-hot/client Webpack entry script