-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
Setting browser.hydrate to false renders the client-side router unusable whilst not disabling it. This results in the following behaviour:
- Link gets clicked
- URL in address bar changes
- Content of page stays unchanged
Setting export const hydrate = false on a page does interestingly not break the router.
Reproduction
- Start the dev server and click on the links to observe the broken router
- Comment the
browser: { hydrate: false },line insvelte.config.jsand restart the dev server to see the router working again.
Logs
When clicking on link (browser console):
[HMR][Svelte] Unrecoverable HMR error in <Root>: next update will trigger a full reload
Uncaught (in promise) Error: options.hydrate only works if the component was compiled with the `hydratable: true` option
at Object.claim [as l] (root.svelte? [sm]:50:13)
at init (index.mjs:1883:40)
at new Root (root.svelte? [sm]:16:25)
at createProxiedComponent (svelte-hooks.js:341:9)
at new ProxyComponent (proxy.js:242:7)
at new Proxy<Root> (proxy.js:349:11)
at initialize (start.js:702:10)
at update (start.js:631:4)
at async navigate (start.js:1241:3)
System Info
System:
OS: Windows 10 10.0.19044
CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Memory: 10.11 GB / 15.93 GB
Binaries:
Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
npm: 8.3.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (99.0.1150.36)
npmPackages:
@sveltejs/adapter-netlify: ^1.0.0-next.51 => 1.0.0-next.51
@sveltejs/kit: next => 1.0.0-next.299
svelte: ^3.46.4 => 3.46.4Severity
serious, but I can work around it
Additional Information
No response
hartwm, CaptainCodeman, doughorne, digi4care, FarhanAliRaza and 1 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
