You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The unfortunate reality is that sometimes I need to do work in non-SvelteKit environments, e.g. WordPress. Ideally, I would like to get the benefits of Svelte and SvelteKit, but be able to deploy to such distasteful environments without mucking about with them too much.
Describe the proposed solution
What if SvelteKit's adapter API had a web component based embedding mode?
There are several ways this could work, but here is one idea:
The SvelteKit app still gets deployed with usual adapters (e.g. Vercel, Netlify, Node, etc)
However, the app is modified to act as a backend for deploying web components elsewhere
+page.svelte routes get compiled to web components
The web components may be served through an automatically generated endpoint, or packaged using svelte-package
+page.js/ts load mechanisms still work, but are compiled to endpoints why serve the corresponding web components with data.
An automatically generated docs page is served, providing snippets for CORS config, and - eventually perhaps - web component usage snippets.
There would obviously be some limitations, e.g. SSR is excluded in this mode; I am not familiar enough with the nuances of SvelteKit to know what they would be.
Alternatives considered
Setting this up manually, probably with a monorepo including one package for the web components, and another for the backend.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered:
Describe the problem
The unfortunate reality is that sometimes I need to do work in non-SvelteKit environments, e.g. WordPress. Ideally, I would like to get the benefits of Svelte and SvelteKit, but be able to deploy to such distasteful environments without mucking about with them too much.
Describe the proposed solution
What if SvelteKit's adapter API had a web component based embedding mode?
There are several ways this could work, but here is one idea:
+page.svelte
routes get compiled to web componentssvelte-package
+page.js/ts
load mechanisms still work, but are compiled to endpoints why serve the corresponding web components with data.There would obviously be some limitations, e.g. SSR is excluded in this mode; I am not familiar enough with the nuances of SvelteKit to know what they would be.
Alternatives considered
Setting this up manually, probably with a monorepo including one package for the web components, and another for the backend.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: