Open Fankhauser-Dominik opened 2 years ago
Hi @Fankhauser-Dominik, this is a totally reasonable request, unfortunately Plenti is not great at working with other packages at the moment. At the core we try to take the unbundled approach like Snowpack, but it currently only works with ESM ready packages that are simple JS (it doesn't know how to go into npm and compile a svelte file there).
Long-term it would be nice if we made Plenti work better with other packages, most likely with the help of esbuild, which we could use natively (just not sure how the svelte compiling step would work).
Short-term, here are a couple of potential solutions:
dist
folder in your package with precompiled components?lib
folder into a Plenti project and use it directlyThose probably aren't ideal suggestions, but let me know if you want to explore either of them. Thanks!
Hi @jimafisk Thanks for your reply. I already tried your second solution, but unfortunately, it didn't work for me. I will try to compile my Components. I will let you know if it works.
Yeah I'm having trouble getting it working as well. A couple of problems are holding this back:
SyntaxError: Unexpected token '-'
Plenti doesn't always play nicely with the JS toolchain unfortunately, hopefully we can make this better over time. For now, if work can be done with existing tools outside of the Plenti build, that might be the best path forward. Thanks for flagging this and testing your module @Fankhauser-Dominik.
I wanted to create a Masonry Gallery with Photoswipe Lightbox support: Svelte Photoswipe Gallery How can I convert this into a Plenti conform Package? I'm a little bit lost about how to get that working. I would appreciate it, if someone could help me. It would be cool if we could have some guidance on how to properly write a package, to be used with Plenti. Or if Plenti would include a bundler.
Thank you