Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] More powerful and configurable rendering options #2008

Merged
merged 1 commit into from
Jul 27, 2021

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented Jul 25, 2021

Allows rendering options to be functions, so that you can do dynamic rendering, true-er SPA mode, and other cool stuff.

Closes #1650 - the highly requested "true-er spa mode"
I think it also closes #1942 - considering rendering options on error pages as requested by @GrygrFlzr though I didn't test that yet
Maybe closes #933 ?

TO NOTE:

  • I left the behavior the same as it currently is in terms of default settings. However, I don't know that these are the defaults I would have picked. Do people really want to disable routing on a per-page basis? Reading the page settings in four different options means you have to set four different options to use true-er SPA mode. I think that true-er SPA mode will have way more users than these per-page settings and so a better default would be to just say that client routing, ssr, and probably hydration are always on and if users want to configure on a per-page basis they can do that by passing a function which either reads the page-level option or request path. For now I just want to get the functionality implemented and then we can discuss defaults as a possible follow up

@changeset-bot
Copy link

changeset-bot bot commented Jul 25, 2021

🦋 Changeset detected

Latest commit: 9b64790

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benmccann benmccann merged commit 538de3e into master Jul 27, 2021
@benmccann benmccann deleted the scriptable-opts branch July 27, 2021 20:13
sidharthv96 added a commit to sidharthv96/kit that referenced this pull request Jul 31, 2021
…ePath

* 'master' of https://github.com/sveltejs/kit: (85 commits)
  [chore] minor simplification of `parse_body` (sveltejs#2043)
  Version Packages (next) (sveltejs#2026)
  [chore] deduplicate config types (sveltejs#2030)
  [chore] remove invalid css declaration (sveltejs#2038)
  [fix] correctly pass Vite options in preview mode (sveltejs#2036)
  [feat] Ignore adapter build files (sveltejs#1924)
  [chore] Upgrade Rollup
  Don't check external links on prerender (sveltejs#1679)
  Version Packages (next) (sveltejs#2017)
  [chore] convert remaining type aliases (sveltejs#2018)
  [feat] explicitly set compilerOptions.hydratable to config.kit.hydrate (sveltejs#2024)
  [feat] More powerful and configurable rendering options (sveltejs#2008)
  [chore] typecheck example (sveltejs#2019)
  Change config `prerender.force` to `prerender.onError` (sveltejs#2007)
  [chore] prefer interfaces to types (sveltejs#2010)
  [docs] minor wording improvement in migration guide (sveltejs#2006)
  [chore] test debugging improvements
  [docs] fix typo (sveltejs#2003)
  [chore] use @ts-expect-error instead of @ts-ignore (sveltejs#1999)
  Version Packages (next) (sveltejs#1996)
  ...
Rich-Harris added a commit that referenced this pull request Jul 31, 2021
@github-actions github-actions bot mentioned this pull request Aug 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant