sveltia/sveltia-cms

`script` tag needs `type="module"` for Sveltia CMS to appear in Astro project, but README doesn't say so

Closed this issue · 1 comments

I have just tried to migrate my Astro project from DecapCMS to Sveltia CMS, following the instructions. However, the viewport remained empty when navigating to the admin route.

Through the zankhq/astro-starter template I found out that the script tag needs type="module" for Sveltia CMS to work under these circumstances. This is not mentioned in the README.

I don't know when type="module" is needed and when it isn't, but I wanted to report back this papercut in case the maintainer(s) want to improve the instructions.

sveltia-cms.js was shipped as an ES module in earlier versions so type="module" was needed. v0.21.0 changed the bundle to an IIFE so you no longer need it.