Improved Build Output for Viewer Package: A Boost for Developers and Hackers

Hey everyone,

Starting with version 2.20.1 for the viewer package, we’ve brought some welcomed changes to how the package is being built, aligning it more closely with ESM spec standards. This means it can be loaded in more environments, even those without transpilation, and directly through native browser module support. Kudos to @fabians for his work on this! :star_struck:

How will this affect existing applications?

It is unlikely that there will any action will be needed for existing applications that use the viewer package. The viewer API will not be affected in any way. There may be issues with some older build configurations (3 years+). Modern & up to date build tools/bundlers will have no issue handling the library

Say Hello to StackBlitz

For almost a year, we’ve been using https://codesandbox.io to create and share live viewer examples. With version 2.20.1 and forward we decided to switch over to StackBlitz . You will find they are very similar and as easy to use. Here’s a simple example. Any existing projects that you might have on codesandbox.io will still exist and run, however they will not support version 2.20.1 and upwards (at least at the moment of this writing)

My Favorite Part!

Due to the recent changes in the speckle viewer’s build output, you can now use other environments like jsfiddle to develop and test your own apps using the speckle viewer. Here’s an example fiddle! Not only that, because the speckle viewer no longer requires transpilation you can just grab the build from somewhere like esm.sh and get cracking!

5 Likes