fastify / fastify/fastify-vite

Multiple plugins possible?

Open
#272 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.1k
Forks
103
Avg merge
6h 54m
Merged PRs (30d)
7

Description

### Prerequisites

- [x] I have written a descriptive issue title
- [x] I have searched existing issues to ensure the issue has not already been raised

### Issue

I see in the known limitations section it says that its not possible to register FastifyVite multiple times. But the issue is closed out until Vite environments was merged in. I see that has now happened and I'm wondering if its possible to register FastifyVite multiple times now.

I ask because I'm trying to have my main Vue application run in SPA mode and have a separate page (only a single page) be SSR. It feels too heavy handed to use fastify-vue and annotate everything client side only and get all the other functionality I don't need for a single page but I can't figure out how to get my existing SPA and separate page to all play nicely in the same fastify server. I'm thinking having two instances of fastify-vite, one in SPA mode and the other pointed at the separate entry point for the page I want rendered would work.

If it is possible could you please provide an example of how to do it? Or if there is a better way to accomplish what I'm trying to do please let me know.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.