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

Better/faster exporting #335

Merged
merged 14 commits into from
Aug 3, 2018
Merged

Better/faster exporting #335

merged 14 commits into from
Aug 3, 2018

Conversation

Rich-Harris
Copy link
Member

This improves the sapper export experience in a number of ways:

  • It updates to the latest port-authority, which fixes a setTimeout bug that caused export to always take at least 5 seconds
  • It adds a --build flag (that defaults to true) which allows you to reuse an existing build by running sapper export --no-build. This fixes export without rebuilding #325
  • It adds a --build-dir flag that allows you to specify the export directory, which defaults to .sapper/prod (dev now defaults to .sapper/dev, so that you can see the outputs side-by-side)
  • The terminal output is more informative. Instead of having duplicate entries for failed requests (one for the saved error file, one for the error itself), they are grouped together, and large files are highlighted. In this screenshot, I've added a large page, a very large page, and a few pages that error out:

screen shot 2018-08-02 at 8 23 31 am

This is a lot more informative than what we had before.

@Rich-Harris
Copy link
Member Author

One more additional feature: it now handles redirects, by creating a file like this:

<!-- redirect-from/index.html -->
<script>window.location.href = "/redirect-to"</script>

@Rich-Harris Rich-Harris merged commit eae8351 into master Aug 3, 2018
@Rich-Harris Rich-Harris deleted the gh-325 branch August 3, 2018 04:11
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 this pull request may close these issues.

export without rebuilding
1 participant