Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

export without rebuilding #325

Closed
Rich-Harris opened this issue Jul 27, 2018 · 1 comment · Fixed by #335
Closed

export without rebuilding #325

Rich-Harris opened this issue Jul 27, 2018 · 1 comment · Fixed by #335

Comments

@Rich-Harris
Copy link
Member

This is perhaps related to #323: in some situations, you might want to re-export an app without rebuilding it (because rebuilding is generally the bottleneck). For example, your pages might be based on frequently-updating data.

In this situation it'd be useful to be able to use a previous build of the app — something like this...

sapper export --no-build

...or maybe this:

sapper export --build-dir=my-custom-build-dir

If you wanted to eke out even more performance you could do so by running the server in the background and curling it yourself. But that would be a nuisance because you'd have to reimplement all the crawling logic (or otherwise be careful to hit all the pages that need to be regenerated), so the CLI flag could be a useful halfway house.

cc @1wheel

Rich-Harris added a commit that referenced this issue Aug 3, 2018
Rich-Harris added a commit that referenced this issue Aug 3, 2018
* add --build and --build-dir options to sapper export (#325)

* tweak export logging, update port-authority to prevent timeout bug

* better logging of export progress

* handle case where linked resource is already fetched

* default to .sapper/dev instead of .sapper

* handle query params and redirects

* dont write server_info.json either - second half of #318

* update changelog

* update lockfile

* try to track down ci test failures

* err wut

* curiouser and curiouser

* ok, seems to work now
@Rich-Harris
Copy link
Member Author

Exporting is faster in 0.15.5, and there are two new CLI flags — --no-build, which reuses an existing build, and --build-dir, which specifies which directory to build to (or the location of a pre-existing build).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant