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] explicitly set compilerOptions.hydratable to config.kit.hydrate #2024

Merged
merged 2 commits into from
Jul 27, 2021

Conversation

dominikg
Copy link
Member

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

Until now vite-plugin-svelte defaults to hydratable: true, but that is going to change.
See sveltejs/vite-plugin-svelte#122

To avoid breaking, kit has to set hydratable explicitly.
vite-plugin-svelte also offers a new option experimental.dynamicCompileOptions that could be used to implement a more finegrained solution of which components need hydration. see sveltejs/vite-plugin-svelte#121

@changeset-bot
Copy link

changeset-bot bot commented Jul 27, 2021

🦋 Changeset detected

Latest commit: 849e635

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

Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lint is failing

packages/kit/src/core/build/index.js Outdated Show resolved Hide resolved
@dominikg
Copy link
Member Author

lint is failing

hmm, locally both pnpm lint and pnpm check passed without failing.
svelte-check output mentioned a config load issue though for pnpm check

│ Error while loading config
│ TypeError: Cannot read property 'compilerOptions' of undefined
│     at ConfigLoader.loadConfig (/home/dominikg/develop/sveltejs/kit/node_modules/.pnpm/svelte-check@2.2.0_svelte@3.40.0/node_modules/svelte-check/dist/src/index.js:26654:31)
│     at async ConfigLoader.loadAndCacheConfig (/home/dominikg/develop/sveltejs/kit/node_modules/.pnpm/svelte-check@2.2.0_svelte@3.40.0/node_modules/svelte-check/dist/src/index.js:26643:46)
│     at async /home/dominikg/develop/sveltejs/kit/node_modules/.pnpm/svelte-check@2.2.0_svelte@3.40.0/node_modules/svelte-check/dist/src/index.js:26605:17
│     at async Promise.all (index 2)
│     at async ConfigLoader.loadConfigs (/home/dominikg/develop/sveltejs/kit/node_modules/.pnpm/svelte-check@2.2.0_svelte@3.40.0/node_modules/svelte-check/dist/src/index.js:26607:13)
│     at async createLanguageService (/home/dominikg/develop/sveltejs/kit/node_modules/.pnpm/svelte-check@2.2.0_svelte@3.40.0/node_modules/svelte-check/dist/src/index.js:79394:5)

@benmccann
Copy link
Member

lint is passing now. the warning is a bug in svelte-check

@benmccann benmccann merged commit b51c8f0 into master Jul 27, 2021
@benmccann benmccann deleted the feat/explicit-hydratable branch July 27, 2021 23:37
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)
  ...
@dominikg dominikg changed the title [feat] explicitly set compilerOptions.hydratable to config.kit.ssr [feat] explicitly set compilerOptions.hydratable to config.kit.hydratet Jul 31, 2021
@dominikg dominikg changed the title [feat] explicitly set compilerOptions.hydratable to config.kit.hydratet [feat] explicitly set compilerOptions.hydratable to config.kit.hydrate Jul 31, 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
Development

Successfully merging this pull request may close these issues.

2 participants