preact-custom-element icon indicating copy to clipboard operation
preact-custom-element copied to clipboard

how to publish and then use my web component in other websites?

Open da1z opened this issue 1 year ago • 1 comments

is there any guide how to properly publish web component? to npm maybe? and then use it through embedding script ?

da1z avatar May 06 '24 19:05 da1z

No guide exists as far as I'm aware as it's no different from any other library really.

Is there anything in particular you're looking for/confused on?

rschristian avatar May 17 '24 17:05 rschristian

No guide exists as far as I'm aware as it's no different from any other library really.

Is there anything in particular you're looking for/confused on?

yes. i want to make a component that can be used any any web page by jest embedding script tag . The question is how to setup my project to make script output ?

da1z avatar May 19 '24 17:05 da1z

Do you want a widget, or a widget and a component library?

Here's an example of a widget, it's nothing fancy: https://github.com/rschristian/demo__preact-custom-element-widget

rschristian avatar May 19 '24 20:05 rschristian

Just widget. No component library

da1z avatar May 20 '24 00:05 da1z

Then that should do it.

rschristian avatar May 20 '24 01:05 rschristian