mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 13:48:13 +00:00
fix(nuxt): use static import for updateAppConfig
in HMR (#28349)
This commit is contained in:
parent
153ccc2089
commit
2def6d7e00
@ -341,9 +341,10 @@ import { defuFn } from 'defu'
|
|||||||
const inlineConfig = ${JSON.stringify(nuxt.options.appConfig, null, 2)}
|
const inlineConfig = ${JSON.stringify(nuxt.options.appConfig, null, 2)}
|
||||||
|
|
||||||
/** client **/
|
/** client **/
|
||||||
|
import { updateAppConfig } from '#app/config'
|
||||||
|
|
||||||
// Vite - webpack is handled directly in #app/config
|
// Vite - webpack is handled directly in #app/config
|
||||||
if (import.meta.dev && !import.meta.nitro && import.meta.hot) {
|
if (import.meta.dev && !import.meta.nitro && import.meta.hot) {
|
||||||
const { updateAppConfig } = await import('#app/config')
|
|
||||||
import.meta.hot.accept((newModule) => {
|
import.meta.hot.accept((newModule) => {
|
||||||
updateAppConfig(newModule.default)
|
updateAppConfig(newModule.default)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user