sveltejs / sveltejs/kit

Refresh SSG prerender without Vite Build

Open
#5,761 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

p2-nice-to-have
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the problem

Right now it's not possible to run SSG without always building/bundling both the app & ssr bundle for production.

If no changes have been made to the frontend source, there's no current way to say "just update the prerendered set of pages".

In other words, if only the backend changes, then we shouldn't have to rebundle everything just to regenerate these pages.

Describe the proposed solution

A way to simply rerun the prerendering step independent of the bundling step, since bundling takes a long time.

I think this is independent of incremental build, since we want to "build" again, but not waste effort bundling if we don't have to.

Alternatives considered

I've looked at https://github.com/sveltejs/kit/issues/2369 but this still will go through the entire bundle/build.

Importance

would make my life easier

Additional Information

I have a website that periodically refreshes pages when content changes (only updates a few times a month). I'd like it so I don't have to waste too much time when changes are made to rerender these pages, since the backend will update much more often than the frontend source.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how SSG prerendering is coupled to the Vite production app and SSR bundle builds. Compare the proposed behavior with issue 2369 and incremental build issue 661; done means a documented or implemented way to rerun prerendering after backend changes without rebundling unchanged frontend sources.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, vite
Domain
build-system, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.