Export vite-plugin-sveltekit
for usage without Sveltekit CLI.
#4223
Milestone
vite-plugin-sveltekit
for usage without Sveltekit CLI.
#4223
Describe the problem
It's currently not straight forward to build on top of Sveltekit since the CLI manages all our interactions with Sveltekit core. Since the refactor of Sveltkit core into a plugin, the path to making Sveltekit usable as a Vite plugin seems more tenable with a few modifactions. With the exception of the CLI, Sveltekit-package and adapters much of the framework's functionality lives in the internal plugins already.
Reasons to export the plugin publicly:
Describe the proposed solution
I imagine having the packages
@sveltejs/vite-plugin-sveltekit
and@sveltejs/vite-plugin-sveltekit/core
.@sveltejs/vite-plugin-sveltekit
would be targeted at userland, and would be something like:and
@sveltejs/vite-plugin-sveltekit/core
would look like:and integrated into other setups like:
I admittedly haven't thought too much how adapters fit into the picture since I'm not yet intimate with how they actually work.
Alternatives considered
Add Sveltekit hooks. I haven't thought deeply about how this would look like but adding a plugin system on top of Svelkit might achieve something similar but it's additional overhead/maintenance for a less universally useful (read worse) outcome.
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: