Alternative to Netlify/Decap CMS. Fast, lightweight, Git-based headless CMS. Modern UX, first-class i18n support, open source & free. Made with Svelte.
MIT License
952
stars
48
forks
source link
`script` tag needs `type="module"` for Sveltia CMS to appear in Astro project, but README doesn't say so #246
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.
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 needstype="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.