I am new to lit specifically, and web components in general. I have built a web component for usage in Wix (as a custom element), just using straight vanilla js, and have found some success. See https://app.njaplatform.one/rating-element.js for a sample of what I built.
However, I have been asked to redo the work in Lit (https://lit.dev/). I like the syntax of the code better, and it feels like a smarter way to go (as a developer). However, I am really struggling with publishing it.
Whilst I have been able to rebuild my component in Lit, and it is working when I run a local "Web Dev Server", I am really uncertain as to how I publish my lit component so that it is available to other sites. I haven't found any great documentation, walkthroughs, or tutorials on this area. I am really struggling to get over this implementation hump (I am more of a front-end developer and can do some deployments, but I am often very dependent on documentation and well-established ways of doing things).
Key points:
I started with the typescript starter kit at https://lit.dev/docs/tools/starter-kits/
Running
npm run serve
serves the app to a 'Web Dev server' and that appears fine locally for testing.I am not sure what I should be doing when I build/deploy the app.
I have made some attempts to publish on some services online, and I am getting a mix of failures, or partial successes which fashion some documentation on the component (generated by eleventity), but the actual javascript generated appears to break as either
1: file not founds (404), or, 2: Error resolving module specifier "Lit". Relative module specifiers must start with "./", "../", or "/"
Not sure how to proceed, would appreciate some "Lit 101" input on strategies as to what I should be doing at this point.