mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +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)}
|
||||
|
||||
/** client **/
|
||||
import { updateAppConfig } from '#app/config'
|
||||
|
||||
// Vite - webpack is handled directly in #app/config
|
||||
if (import.meta.dev && !import.meta.nitro && import.meta.hot) {
|
||||
const { updateAppConfig } = await import('#app/config')
|
||||
import.meta.hot.accept((newModule) => {
|
||||
updateAppConfig(newModule.default)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user