fastify-vite icon indicating copy to clipboard operation
fastify-vite copied to clipboard

How to configure multi-page entry

Open sbfkcel opened this issue 1 year ago • 8 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have searched existing issues to ensure the feature has not already been requested

🚀 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

sbfkcel avatar Aug 30 '23 04:08 sbfkcel

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(?)

wimbarelds avatar Jun 19 '24 13:06 wimbarelds

How do you configure multiple entry points with vite?

onlywei avatar Jun 22 '24 16:06 onlywei

How do you configure multiple entry points with vite?

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

wimbarelds avatar Jun 24 '24 10:06 wimbarelds

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.

Dan-Shields avatar Aug 07 '24 15:08 Dan-Shields

Cc @galvez if you have time

gurgunday avatar Aug 08 '24 17:08 gurgunday

@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 avatar Aug 08 '24 17:08 galvez

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!

galvez avatar Aug 08 '24 17:08 galvez

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

onlywei avatar Aug 09 '24 03:08 onlywei