mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix: use esm syntax for webpack module hot (#316)
This commit is contained in:
parent
be835de180
commit
1bd0b74299
@ -26,8 +26,9 @@ if (process.server) {
|
|||||||
if (process.client) {
|
if (process.client) {
|
||||||
// TODO: temporary webpack 5 HMR fix
|
// TODO: temporary webpack 5 HMR fix
|
||||||
// https://github.com/webpack-contrib/webpack-hot-middleware/issues/390
|
// https://github.com/webpack-contrib/webpack-hot-middleware/issues/390
|
||||||
if (process.dev && module.hot) {
|
// @ts-ignore
|
||||||
module.hot.accept()
|
if (process.dev && import.meta.webpackHot) {
|
||||||
|
import.meta.webpackHot.accept()
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = async function initApp () {
|
entry = async function initApp () {
|
||||||
|
Loading…
Reference in New Issue
Block a user