emmanueltouzery / prelude-ts

Functional programming, immutable collections and FP constructs for typescript and javascript
ISC License
377 stars 21 forks source link

Cannot stringify arbitrary non-POJOs Some. #77

Closed maximkrouk closed 1 year ago

maximkrouk commented 1 year ago

When nuxt.renderJsonPayloads is enabled in Nuxt 3, it causes the error. Disabling this option in nuxt.config.ts allows the preview to work, but the error still appears in the console. I'm not sure if this is a problem with Nuxt itself, but since it's related to this specific dependency, I decided to create an issue here. Maybe someone else has encountered this issue and found a solution. 🤔

Here is a link to StackBlitz. The only modification I made to the original vitesse-nuxt3 repository is adding prelude-ts and utilizing Option in composables/user.ts for the savedName field. I also updated its usage in pages/hi/[id].vue.

maximkrouk commented 1 year ago

Fixed locally with the following nuxt plugin: https://gist.github.com/maximkrouk/b9546884ce941edd6eecb84b0220762f Not the perfect solution, but it's just for a personal site, so it's enough for now 😔

emmanueltouzery commented 1 year ago

i don't really understand what was that about. but i'm glad you have a solution :+1: