svelte-grid icon indicating copy to clipboard operation
svelte-grid copied to clipboard

How to use it as "vanillajs" library?

Open CodeFetch opened this issue 3 years ago • 1 comments

I'd like to build it as a library which I can use in non-Svelte projects. How is this possible? Currently I'm writing a wrapper for achieving this, but maybe I'm just too stupid and there is an easier way?!

CodeFetch avatar Jan 09 '22 01:01 CodeFetch

i guess the only option is to build a web component

this may help you: https://svelte.dev/docs#run-time-custom-element-api

Personally i have never tried to compile a svelte component to a web component. There are few articles on this topic, you can do you own research.

I am not 100% sure, that you will succeed by doing this, because right now svelte has few issues with web-components

This article explains things really good https://javascript.plainenglish.io/can-you-build-web-components-with-svelte-3c8bc3c1cfd8

vaheqelyan avatar Jan 09 '22 14:01 vaheqelyan