diff --git a/package.json b/package.json index 82e06ad6..56af32e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-cool-starter", - "version": "4.3.5", + "version": "4.3.6", "private": true, "description": "A starter boilerplate for a universal web application with the best development experience and best practices.", "license": "MIT", diff --git a/src/client/index.tsx b/src/client/index.tsx index 2759e07b..20ec5837 100755 --- a/src/client/index.tsx +++ b/src/client/index.tsx @@ -23,3 +23,9 @@ const render = (Routes: RouteConfig[]) => // loadable-component setup loadableReady(() => render(routes as RouteConfig[])); + +/** + * A temporary workaround for Webpack v5 + HMR, why? see this issue: https://github.com/webpack-contrib/webpack-hot-middleware/issues/390 + */ +// @ts-expect-error +if (module.hot) module.hot.accept();