Nitro js #194
Replies: 4 comments
-
Nitro is somewhat incompatible with Vike, there are too many overlapping features, and I have not found (yet) a way to make use of Nitro in a meaningful way. H3, which powers Nitro web server, is already implemented though. Keeping this issue opened for discussion. |
Beta Was this translation helpful? Give feedback.
-
I'm curious as to why that is. As nitro is used in nuxt and solid start it seems like a perfect candidate to be combined with Vike. What kind of features do overlap too much and would it be possible to choose which one to use if desired by the end user? |
Beta Was this translation helpful? Give feedback.
-
@ThimoDEV Vike routing behaviour is central to the way it works, and it seems to be the same for Nitro. We would need a custom Nitro middleware for routing, duplicating the work of Vike (and probably impacting performances). Auto imports are probably not compatible with Vike compiler. This leaves Storage Layer and Cache API as unique features of Nitro, which can probably be replaced by some npm module if necessary. tl;dr It would take a lot of time to implement, properly test and keep up to date with Vike, so for now it's not a priority for me. |
Beta Was this translation helpful? Give feedback.
-
That makes sense, I thought Vike was a bit different but I understood it incorrect. In the mean time I came across https://github.com/nksaraf/vinxi Vinxi, which should combine barebones vite with nitro, which seems a working alternative for me. Thank you for your explanation! I don't know if this issue should be closed, or if someone as you said wants to make a PR. So I leave that up to you |
Beta Was this translation helpful? Give feedback.
-
Add Nitrojs.
Beta Was this translation helpful? Give feedback.
All reactions