Solid Start Does Not Work With Cloudflare Pages

HTML minification is causing hydration issues with Solid Start. Solid Start uses HTML comments for hydration and CF is apparently stripping these and sites will build... but on first render errors pursue. For examples in production:
TypeError: Cannot read properties of undefined (reading 'cloneNode')
at yt (entry-client.c16bf715.js:1:18059)
at Object.fn (entry-client.c16bf715.js:1:23293)
at Ue (entry-client.c16bf715.js:1:5473)
at se (entry-client.c16bf715.js:1:5259)
at Object.it (entry-client.c16bf715.js:1:4286)
at Te (entry-client.c16bf715.js:1:9025)
at Te (entry-client.c16bf715.js:1:9022)
at Object.fn (entry-client.c16bf715.js:1:4032)
at Ue (entry-client.c16bf715.js:1:5473)
at se (entry-client.c16bf715.js:1:5259)
TypeError: Cannot read properties of undefined (reading 'cloneNode')
at yt (entry-client.c16bf715.js:1:18059)
at Object.fn (entry-client.c16bf715.js:1:23293)
at Ue (entry-client.c16bf715.js:1:5473)
at se (entry-client.c16bf715.js:1:5259)
at Object.it (entry-client.c16bf715.js:1:4286)
at Te (entry-client.c16bf715.js:1:9025)
at Te (entry-client.c16bf715.js:1:9022)
at Object.fn (entry-client.c16bf715.js:1:4032)
at Ue (entry-client.c16bf715.js:1:5473)
at se (entry-client.c16bf715.js:1:5259)
In development...
Error: Unrecoverable Hydration Mismatch. No template for key: 0-0-0-0-0-0-0-0-0-1-1-0-0-0-0-1-0-0-0-0
at getNextElement (dev.js:250:26)
at Object.fn (dev.js:590:43)
at runComputation (dev.js:708:22)
at updateComputation (dev.js:691:3)
at createMemo (dev.js:244:10)
at Dynamic (dev.js:580:10)
at Styled (index.js:79:18)
at dev.js:527:12
at untrack (dev.js:427:12)
at Object.fn (dev.js:523:37)
Error: Unrecoverable Hydration Mismatch. No template for key: 0-0-0-0-0-0-0-0-0-1-1-0-0-0-0-1-0-0-0-0
at getNextElement (dev.js:250:26)
at Object.fn (dev.js:590:43)
at runComputation (dev.js:708:22)
at updateComputation (dev.js:691:3)
at createMemo (dev.js:244:10)
at Dynamic (dev.js:580:10)
at Styled (index.js:79:18)
at dev.js:527:12
at untrack (dev.js:427:12)
at Object.fn (dev.js:523:37)
Is this a known issue? Is this on the roadmap?
1 Reply
Walshy
Walshy2y ago
I'd recommend disabling minification it's known it can cause issues with some things
Want results from more Discord servers?
Add your server