-
Describe the bugI have the following hooks.server.ts. It replaces all words starting and ending with underbar, It works for all the texts but it doesn't work for class.
+page.svelte
Output:
If it is intended so, how can I apply ReproductionI create a simple stackblitz. https://stackblitz.com/edit/sveltejs-kit-template-default-3msgtk?file=src%2Froutes%2F%2Bpage.svelte LogsNo response System Info// stackblitz
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.18.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.3 - /usr/local/bin/pnpm
npmPackages:
svelte: ^4.2.7 => 4.2.15 Severityannoyance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you check what the server gives away, you'll see that both Such use of |
Beta Was this translation helpful? Give feedback.
If you check what the server gives away, you'll see that both
_main_h1_
are replaced. But, at hydration, it gets fixed to match the component template. You can also see it by addingexport const csr = false;
to the+page.js
. Not sure why only the class gets fixed.Such use of
transformPageChunk
doesn't seem to be correct, or at least good, because it causes a hydration mismatch, and such substitution cannot be done for pages rendered on the client.