Skip to content

Separate route deployment #5643

@andreiborisov

Description

@andreiborisov

Describe the problem

We're evaluating SvelteKit as our framework of choice, but we need to control which page will be rendered on which route server-side with answers from our API (dynamically construct the route map). Currently:

  1. There is no way to build and deploy a single route without rebuilding and redeploying the whole app.
  2. The whole route map is static meaning it needs to be known at compile time.

Describe the proposed solution

As far as I understand a hydrated SvelteKit app is not aware what is rendered on a new route already, since the component is loaded during the navigation. So it seems implementing dynamic routing support would be at least somewhat feasible.

The proposed solution: a single route build target which can be deployed separately while working the same as a single deployment.

Alternatives considered

  1. Generating SvelteKit project structure dynamically and redeploying the whole app — this is somewhat okay, but it won't scale nicely for our use case, unfortunately.
  2. Using vanilla Svelte — would require reimplementing all of the niceties of SvelteKit ourselves, which is a huge effort.

Importance

I cannot use SvelteKit without it

Additional Information

Although a big part SvelteKit' appeal is its simple file based routing structure, dynamic routing is an important use case, especially for enterprise applications.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions