šØ CRITICAL: Many popular libraries cause SILENT HYDRATION FAILURE on Cloudflare Pages. This framework helps you test libraries BEFORE deploying broken apps to production.
Libraries like lucide-svelte
can cause your SvelteKit app to:
# Clone this template
git clone https://github.com/yourusername/sveltekit-cf-lib-test-template
cd sveltekit-cf-lib-test-template
# Install dependencies
npm install
# Test a library
npm run test:library lucide-svelte
Run the test:
./scripts/test-library.sh your-library-name
Check results:
View detailed results in the console output
Library | Status | Notes |
---|---|---|
lucide-svelte | š“ | Causes silent hydration failure |
heroicons | š¢ | Static SVGs, safe to use |
date-fns | š¢ | Pure functions, no issues |
chart.js | š” | Requires client-only rendering |
Full database: docs/LIBRARY_DATABASE.md
Protect your production app:
<!-- Add to your app.html -->
<script>
setTimeout(() => {
if (typeof window.__SVELTEKIT__ === 'undefined') {
// Alert your monitoring service
console.error('šØ HYDRATION FAILED! App is broken!');
}
}, 5000);
</script>
docs/LIBRARY_DATABASE.md
Read about the 12-hour debugging journey: blog/cloudflare-sveltekit-hydration-guide.md
MIT - Help the community avoid broken production apps!