Using lib version of noVNC

43 views
Skip to first unread message

Sean Condon

unread,
Mar 3, 2025, 2:36:15 PMMar 3
to noVNC
Hi - I'm trying to use noVNC, and CDNs that are serving it is serving the lib version of it e.g. 

https://cdn.jsdelivr.net/npm/@novnc/no...@1.5.0/lib/rfb.js

I have 2 questions

1) Is there any alternate way of getting the ES6 Module based package through a CDN like this

2) Is there any guide or example of how to use the lib version in a plain HTML page 

Thanks, Sean

Pierre Ossman

unread,
Mar 4, 2025, 6:39:36 AMMar 4
to no...@googlegroups.com, Sean Condon
On 03/03/2025 20:36, Sean Condon wrote:
> Hi - I'm trying to use noVNC, and CDNs that are serving it is serving the
> lib
> <https://github.com/novnc/noVNC/blob/master/docs/LIBRARY.md#conversion-of-modules>
> version of it e.g.
>
> https://cdn.jsdelivr.net/npm/@novnc/no...@1.5.0/lib/rfb.js
>
> I have 2 questions
>
> 1) Is there any alternate way of getting the ES6 Module based package
> through a CDN like this
>

I wasn't even aware that there was one for the npm package.

Why the need for a CDN? You'll need to host your web page somewhere
anyway. Can't you host noVNC there as well?

> 2) Is there any guide or example of how to use the lib version in a plain
> HTML page
>

Two applications are included with noVNC. The minimal example
vnc_lite.html, and the fully features one in vnc.html. I'd suggest
looking at them.

Regards,
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Sean Condon

unread,
Mar 6, 2025, 2:07:46 PMMar 6
to noVNC
Thanks for your answer. I did not want to include all the files and folders in to my application.

I found that the command 
`rollup --format es --input core/rfb.js -o lib/rfb.js`
does what I need.
I think it would be a good idea if you could add something like this in to package.json "scripts"
Reply all
Reply to author
Forward
0 new messages