You might want to extend the functionality of your Latitude projects by using
other npm packages.Here’s how you can do it:
1
Install dependencies
You can install npm dependencies with a regular npm install command from the root of your project. Example:
Copy
npm install --save lodash
This will create a package.json file in your project root and add the
dependency to it. The Latitude CLI will keep track of the dependencies you
install and bundle them with your project.
2
Use your dependencies
Latitude views are a superset of Svelte’s template syntax. So you can use any JS dependency like you would in a Svelte component. Following our example: