Installing dependencies

Use the full power of NPM ecosystem.

The exporter packages are configured so you can install almost any dependency you want through the npm. Because every exporter contains package.json, installing of the dependencies is very easy — simply run:

npm install --save [package-name]

in your exporter package root. Then, run npm run dev or npm run build to make the package part of the export bundle.

Security and limitations

The exporters run in secure hardened container that doesn't have access to the outside execution context by any means. This comes with few specific limitations that usually don't present a problem, but in rare cases might create strange behavior, especially when using sophisticated npm packages with a lot of dependencies.

If you have encountered such a problem and you are sure everything works on your side, ask in our community channels.

require limitations

For security reasons, it is not possible to use require beyond a few specific libraries that were deemed safe to use within the exporters. Those libraries are top-level node libraries, such as encoding and similar. Dynamic require is completely disabled, so it is not possible to dynamically request plugins to certain libraries and so on. Always use { module } import instead.

fetch not available

For security reasons, global fetch is not available. However, we have created a safe way to access data from the network using the Supernova SDK that you can use instead, that makes the fetch available safely.

Top-level utilities removed

Many obscure top-level utilities and classes are completely removed from the execution context. If you are getting X not defined where X is the name of the top-level utility, such as URL (this is however available), then this utility is not available. You can let us know and explain what you are missing and we might introduce it to the execution context in the next version.