Closed r1y4h closed 1 month ago
It seems Astro v4 SSR only supports ESM modules while material-tailwind still uses CommonJS. Thus the problem. Will you convert material-tailwind to use ESM instead? @sajadevo
Reported this to Astro, and they would fix this on their end: https://github.com/withastro/astro/pull/10654
In Astro v3, the documented way of importing works fine for both server side and client side rendering:
In Astro v4, the above works fine for client side rendering.
But if you try this in Astro v4 SSR, Vite will throw an error:
We should be able to import material-tailwind components the same way for both SSR and CSR, so we can fully take advantage of Astro Islands concept.