Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(app): fix webpack hmr errors #290

Merged
merged 2 commits into from
Jun 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/app/src/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ if (process.server) {
}

if (process.client) {
// TODO: temporary webpack 5 HMR fix
// https://github.com/webpack-contrib/webpack-hot-middleware/issues/390
if (process.dev && module.hot) {
module.hot.accept()
}

entry = async function initApp () {
const app = createSSRApp(App)

Expand Down