ElMassimo / iles

🏝 The joyful site generator
https://iles.pages.dev
MIT License
1.06k stars 31 forks source link

Svelte & jsx/tsx don't render without client directives #255

Closed TechAkayy closed 11 months ago

TechAkayy commented 11 months ago

Description 📖

The two components StatsSection & TestimonialSection are svelte & jsx components and they contain only markup.

They don't render and throw errors unless client directives are added to them. Swap the commented out lines in the below reproduction and they work fine.

image

Reproduction 🐞

https://github.com/TechAkayy/natures-delight-with-iles-tailwindcss

Dependencies Info _Run `npx iles info` and `pnpm list` (or `npm list`) and provide the output:_ ``` iles v0.9.5 vite v4.3.9 ```

Screenshots 📷

StatsSection.svelte without client directive throws this error & the page is empty in the browser:

image

TestimonialSection.jsx without client directive throws this error:

image
TechAkayy commented 11 months ago

Okay.. just found the answer in the docs. Non-vue components MUST have a hydration directive. image