Closed BerndWessels closed 1 year ago
You instantiate like any other custom element by putting your tag in the page.
So if your js is
import component from "svelte-tag"
import App from "your-app.svelte"
new component({component:App,tagname:"hello-world",attributes:["name"]})
You'd use the following in your html file.
<hello-world name="Cris"></hello-word>
Hi @crisward
I try to build a custom element with
svelte-tag
asumd
library and consume it in a none svelte (vanilla js) website.I'm confused on how to instantiate the component in the vanilla website.
Could you please explain in a few words / lines of code?
Thank you