Skip to main content

Import and use a package

Dependencies can be very useful to speed up your development time. You can use any JavaScript or TypeScript package from NPM inside your Spell.

To add a package, click on the Dependencies button and use the search input to add a package.

Add package

You can customize the variable name (alias) and the version, by default those are the name of the package and the latest version available.

Change alias and version

Click on Save dependencies to save your modifications.

Your package will be directly imported inside your Spell and you can use it in our code. You have no need of copy any require or import inside the Spell.

Here is an example of a working package:

Example working package