fix: use esm syntax for webpack module hot (#316)

This commit is contained in:
Daniel Roe 2021-07-12 11:19:34 +01:00 committed by GitHub
parent be835de180
commit 1bd0b74299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -26,8 +26,9 @@ 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()
// @ts-ignore
if (process.dev && import.meta.webpackHot) {
import.meta.webpackHot.accept()
}
entry = async function initApp () {