This is my first attempt at OpenSource contribution.
This PR aims to fix a warning of deprecation/future build issues, when compiling SvelteJS apps using this package in Vite and with vite-plugin-svelte:
[vite-plugin-svelte] WARNING: The following packages use a svelte resolve configuration in package.json that has conflicting results and is going to cause problems future.
svelte-router-spa@6.0.3
Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#conflicts-in-svelte-resolve for details.
I have followed the suggestion from the SvelteJS documentation to add support for the exports portion of package.json, while maintaining the existing exports from the src directory. I also referred to this section of the NodeJS documentation for entrypoints for multiple submodules.
I have tested this fork in my own app to ensure that it removes the warning.
BE AWARE: I'm unsure of whether this might remove support for other Svelte compilers (non-Vite), since it is necessary to remove the "svelte" key from package.json for the warning to go away. I was unsure of how to test / proceed with this concern. Feedback greatly appreciated.
Thank you for a great router - I hope this contribution is easy to include, else let me know if some action is needed on my part.
Hello
This is my first attempt at OpenSource contribution. This PR aims to fix a warning of deprecation/future build issues, when compiling SvelteJS apps using this package in Vite and with vite-plugin-svelte:
I've raised this issue a couple of months ago, and wanted to try to fix it myself: https://github.com/jorgegorka/svelte-router/issues/145
Approach:
BE AWARE: I'm unsure of whether this might remove support for other Svelte compilers (non-Vite), since it is necessary to remove the "svelte" key from package.json for the warning to go away. I was unsure of how to test / proceed with this concern. Feedback greatly appreciated.
Thank you for a great router - I hope this contribution is easy to include, else let me know if some action is needed on my part.