Recently spent some time updating this blog to accommodate all the recent breaking changes from sveltekit this summer. overall a relatively painless process on the sveltekit side of things— there was an easy migration helper (
npx svelte-migrate routes) that handled most of the dirty work and left helpful messages for the rest of the things to carry over. there were also a number of packages to be updated.
so i updated my packages, ran the migration helper, fixed those things, and everything worked fine locally and when running
npm run build && npm run preview. yay! the real issue arose when deploying to netlify again— the sveltekit netlify adapter seemed to have issues around bundling for esm. the latest auto adapter also used the netlify adapter, so same issues. i spent a good chunk of time going down these rabbit holes, and then i saw a note in the swyxkit readme (which this blog is based on!) that says:
This project recently switched to use sveltejs/adapter-auto (Oct 2022: currently pinned to v72 https://github.com/sveltejs/kit/issues/6440#issuecomment-1269274541) and that was the silver bullet. Pinning to that version, everything worked when deployed too!
the new routing system in sveltekit seems pretty powerful, and while there are slightly more files it’s easier to find things based on filesystem than a couple of underscores as reserved file names. I’m excited to test the layout break-outs in the future, as things on this site grow. it’ll get there eventually. thanks!