abaga129 / sveltekit-adapter-iis

15 stars 5 forks source link

Fix for using prerendered routes #12

Closed Palkess closed 10 months ago

Palkess commented 10 months ago

When defining routes as prerendered, @sveltejs/adapter-node generates .html-pages under build/prerendered which was missing in the list of files to move to the .svelte-kit/adapter-iis folder. It works fine while navigating from a hydrated route but trying to reload or access a prerendered route directly causes a 500 error.

I added the prerendered folder to the list and also a fs.accessSync check before trying to move each file in the list, if there's no prerendered folder it crashed.

abaga129 commented 10 months ago

Sorry I thought I merged this previously. It's now merged and released as v1.2.2