Unify frontend build #10300
Labels
brainstorming
Brainstorming issue
needs designing
The proposed feature needs to be discussed and designed before being implemented
svelte
Frontend-related issue (JS)
I've attempted this once and it is difficult to find a generic solution, we need to either build something custom, hack around extensively, or wait for a generic framework to cover this usecase.
We have pretty complex needs when it comes to the built output, both. in terms of capability and 'shape'.
We have 4 'modes of consumption':
python
app.launch(ssr_mode=True)
python
app.launch(ssr_mode=False)
js
/html
<gradio-app>
js
/html
<gradio-lite>
We currently cover these cases by doing three separate builds:
We additionally parse the SPAs generate HTML page to create a programmatic way to initialise the SPA in order to support embeds/ webcomponent usecases.
This comes with a number of tradeoffs. It triples our frontend build times, balloons the repo with multiple apps, complicates our tooling, introduces inconsistencies between the 3/4 app types, and increases the maintenance burden as we need to update some things in three different places!
While we are sharing a lot of core logic which reduces the maintenance burden somewhat, it still isn't an ideal situation.
We really need some way to have a single build application and build it for different usecases.
lite
runtime.The programmatic interface is the major issue right now, the SPA HTML entrypoint is also not quite there but we can kind of solve it, if we had that we could probably make all of the other cases work, although Svelte kit does come with certain opinions about how things are mean to work.
This is half tracking/ half brainstorming. Also chatting with the Svelte team, about this. WIll link the issue.
The text was updated successfully, but these errors were encountered: