unjs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.unjs.io
MIT License
5.89k stars 496 forks source link

feat(core): warn if runtime config is not serializable #2542

Closed danielroe closed 3 months ago

danielroe commented 3 months ago

๐Ÿ”— Linked issue

https://github.com/nuxt/nuxt/pull/21466 https://github.com/nuxt/nuxt/issues/13992

โ“ Type of change

๐Ÿ“š Description

Users may be under the impression they can set anything on runtimeConfig, e.g. Set(), Map(), functions, etc. This tries to check if it's a valid JSON object and if not - warn.

๐Ÿ“ Checklist