beynar / sveltekit-sitemap

MIT License
22 stars 2 forks source link

sveltekit hot module reload (HMR) breaks with vite plugin #4

Open SrZorro opened 1 year ago

SrZorro commented 1 year ago

Problem

HMR does not work while the vite plugin is installed

Why

This line breaks the vite HMR update

https://github.com/beynar/sveltekit-sitemap/blob/d35ca45502a3c4cc353a01e1dd888cc4c36f7d34/sveltekit-sitemap/src/plugin.ts#L30

Posible solution

the routesDir with the default value of ./src/routes its already being watched without the .add, so it can be removed and the plugin keeps working

SushiWaUmai commented 1 year ago

Having the same problem any updates?

Joonel commented 1 year ago

@SushiWaUmai You can use my fork — https://github.com/Joonel/sveltekit-sitemap