Closed sg-qwt closed 10 months ago
Hi @sg-qwt, I agree that the currently documented approach isn't optimized for end users. It was more for getting people quickly experimenting with building custom viewers that have npm dependencies. I think the problem of packaging and distribution is larger and more difficult to solve generally.
Currently, nothing is stopping viewer authors from pre-bundling their npm deps into their jars to provide such an experience since Portal will gladly load any arbitrary JS resolvable via the classpath. However, while this makes it a easier for end users, it does make it a bit more awkward for authors.
I haven't had time to experiment with what this type of workflow would look like. Is this something you would be interested in experimenting with?
Hi @djblue, thanks for getting back. How to packackge/bundle custom viewer is definitely something I'd like to explore. Unfortunately, I've been quiet busy lately that it's unlikely I'll poke around this issue in short future. For now, I'll close this, I'll report back if any experiment made with this in future. Again, thanks!
Hi there,
I took a look at the plotlyjs viewer example in the repo the other day, this whole npm load approach feels very weird and not very intuitive to me. Just some of my thoughts on the custom viewer approach as a user's perspective, thanks!
Ideally, I'd like to have a same 'easy as breezy' install approach for custom viewers same as portal itself by just adding the relevant viewer plugin to deps.edn for example:
Best