You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently started using nuxt and discovered a bug in my application due to the way the runtimeConfig is parsed.
Previously I was using process.env and expecting a string value for TRUE however nuxt is using destr which is parsing this value as a boolean.
Ignoring any architectural issues from my use case, is this parsing behavior considered part of nuxt's public API so that I can now deterministically predict how the values will be parsed? I don't see this documented anywhere, so I have reservations about depending on this behavior if it could change. But if this is the desired behavior can it be documented.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I recently started using nuxt and discovered a bug in my application due to the way the runtimeConfig is parsed.
Previously I was using
process.env
and expecting a string value forTRUE
however nuxt is using destr which is parsing this value as a boolean.nuxt code
https://github.com/nuxt/nuxt.js/blob/cd7b9ca5d885270b590c691a61f8ca65fe288be1/packages/config/src/load.js#L111
destr code
https://github.com/unjs/destr/blob/master/src/index.ts#L20-L26
Ignoring any architectural issues from my use case, is this parsing behavior considered part of nuxt's public API so that I can now deterministically predict how the values will be parsed? I don't see this documented anywhere, so I have reservations about depending on this behavior if it could change. But if this is the desired behavior can it be documented.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions