New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate to latest sveltekit #70
Comments
Maybe try running vite with debug enabled: DEBUG=vite:* pnpm dev |
This still needs to be root caused because I have no idea why this is needed. It works reliably for me and gets this lib into a usable state with recent versions of Svelte.
Hey @mihar-22, I would REALLY love to contribute here, and to the project as a whole, do you have any place that development of this project can be discussed, A discord server, slack channel, or discussions here on GitHub? I am extremely interested in the goal here, and there is so much potential in this project, I'm going to take a look under the hood at this PR and see if I can help at all, but otherwise is there anything specific you want help with? |
Hi @mihar-22, I have been investigating the issue with the vite server loop and I think I have found the source of the problem. It appears that SvelteKit creates the generated types when the dev server starts and the markdown vite plugin restarts the vite server every time a file is added. In the markdown vite plugin, the server.watcher is listening for file additions or removals and if either of those events occurs, it will trigger a restart of the vite server. server.watcher
.add(globalComponents)
.on('add', (path, stats) => {
console.info('File added', path);
restart();
})
.on('unlink', () => {
console.info('File removed');
restart();
}); The logs indicate that upon initiation of the process to generate types by SvelteKit, the vite server consistently undergoes a restart. 16:06:36 [vite] server restarted.
File added /Users/carsten/Desktop/EigeneProjekte/kit-docs/packages/kit-docs/.svelte-kit/types/src/routes/docs/proxy+page.js
Restarting the server
16:06:36 [vite] server restarted.
File added /Users/carsten/Desktop/EigeneProjekte/kit-docs/packages/kit-docs/.svelte-kit/types/src/routes/docs/proxy+page.js
Restarting the server
16:06:36 [vite] server restarted.
File added /Users/carsten/Desktop/EigeneProjekte/kit-docs/packages/kit-docs/.svelte-kit/types/src/routes/kit-docs/[slug].meta/$types.d.ts
Restarting the server I have tried commenting out the restart() on the add event and it seems to be working fine, except for the sidebar. Currently, you have to manually refresh the page to make changes to the sidebar visible. Let me know if this information helps or if you have any further questions. I am here to assist. |
We're now officially working with SvelteKit 1.0!!!!!!!!!!! Thank you so much to: ❤️ |
Re-opening as a new issue (continuation of this PR) because I was unable to fix the Vite server repeatedly restarting. On top of that I can't release because of a bunch of TS issues as few things in SvelteKit are not playing nice with API Extractor.
This migration has been a huge pain and because of my super limited time it's hard to work through it. If anyone wants to have an attempt at fixing it there are some intstructions in linked PR above. The type issues can be seen if run
npm run build
.The text was updated successfully, but these errors were encountered: