Use as a node module

I’m trying to integrate the Shapediver viewer into a React/Typescript project. The documentation says that there’s only minified variants:

But I would like to use the viewer as a node module and use the import keyword in JS. I’ve found type definitions but this doesn’t seem to map to a NPM package.

Is the viewer also available as an unminified (hopefully Typescript) version? If not, is there a way to use it as such?


We don’t deliver an unminified version, but you can use this example to see how to use the ShapeDiver Viewer in React:
Please install the shapediver-types package using npm, and add “shapediver-types” to compilerOptions.types of your tsconfig.json
In your TypeScript files please use sth like import { Api } from 'shapediver-types'

1 Like


I wonder how to find which ‘shapediver-types’ version corresponds to which ‘viewer’ version, because it looks like the two packages don’t use the same schema.

For example shapediver-types has 77 versions from 1.0.1 till 1.0.78 (only the minor changes)
And for the viewer I am using 2.19.0

Thanks in advance,