fastify / fastify-vite

Fastify plugin for Vite integration.
MIT License
849 stars 71 forks source link

How to configure multi-page entry #113

Open sbfkcel opened 1 year ago

sbfkcel commented 1 year ago

Prerequisites

🚀 Feature Proposal

I tried to configure multi-page entry which is currently not supported

Or did I not find the corresponding documentation?

Motivation

Many times, multi-page entry is very important. Vite itself also allows the configuration of multi-page entrances.

Example

No response

wimbarelds commented 2 months ago

I wanted to use fastify for my dev server, but also needed multiple entrypoints.

Did some digging in the source code but seems this is currently not possible but should be easy to add(?)

onlywei commented 2 months ago

How do you configure multiple entry points with vite?

wimbarelds commented 2 months ago

How do you configure multiple entry points with vite?

https://vitejs.dev/guide/build#multi-page-app

Dan-Shields commented 4 weeks ago

This issue is unfortunately preventing us from using the plugin. It feels like its scope is stretched by offering SSR support which then that means it doesn't support all configuration options in the vite config (rollup inputs are manually specified for MPAs).

I'm going to work on an MPA plugin for vite and report back if I get anywhere.

gurgunday commented 4 weeks ago

Cc @galvez if you have time

galvez commented 4 weeks ago

@Dan-Shields @onlywei indeed, that should be a somewhat straightforward change to implement, where we no longer consider client/index.js but rather a list as defined by the Vite configuration.

galvez commented 4 weeks ago

I still have a massive PR from @onlywei to review over the weekend, but let's see 😄

@onlywei if you want to be onboarded I'll be free Saturday afternoon, let me know!

onlywei commented 4 weeks ago

@galvez I'm unfortunately not free on Saturday afternoon. When is your next availability after that?