NuxtN
Nuxt2y ago
Maiq

Question about app.config HMR behavior

Hello,
I have a question regarding the HMR behavior of
app.config
files.

Changing values or adding keys to config file works fine in development.
But deleting keys from
app.config.ts
does not seem to delete the associated keys in the object returned by
useAppConfig
.

https://github.com/nuxt/nuxt/blob/68f4b193be4a73b49a6be5a8c9e3094fc1d5ebf4/packages/nuxt/src/app/config.ts#L52-L81

According to the source code I linked above, there is a implementation of a HMR behavior that both
deepAssign
s and
deepDelete
s. But currently, when HMR is triggered,
updateAppConfig
function is called which only
deepAssign
s.

Is this the intended behavior? If so, what was the reason behind it?
GitHub
The Intuitive Vue Framework. Contribute to nuxt/nuxt development by creating an account on GitHub.
Was this page helpful?