Documentation
Feedback
Guides
App Development

App Development
App Development
Project structure

Dependencies

Learn how to declare and manage app dependencies in VTEX IO through the manifest.json file, ensuring all required apps are automatically installed and available.

The dependencies property is a JSON object field (dependencies) in the app's manifest.json file.

This field specifies which VTEX IO apps your app relies on to function. Its semantics resemble the dependencies property in package.json for JavaScript applications.

When an app is installed on a VTEX account, every app listed in its dependencies field is automatically installed on that account.

Therefore, if your app needs to interact with another IO app—such as a VTEX API or a Store Framework block—you must declare it in the manifest.json file under dependencies, following this structure: "{account}.{appName}": "{majorVersion}.x".

An example of the dependencies object in an app's manifest.json file is shown below:

manifest.json

_11
"dependencies": {
_11
"vtex.blog-interfaces": "0.x",
_11
"vtex.store": "2.x",
_11
"vtex.styleguide": "9.x",
_11
"vtex.store-components": "3.x",
_11
"vtex.shelf": "1.x",
_11
"vtex.product-summary": "2.x",
_11
"vtex.search-graphql": "0.x",
_11
"vtex.search-page-context": "0.x",
_11
"vtex.css-handles": "0.x"
_11
}

Common use cases

Declaring dependencies is necessary for many common development scenarios, including:

  • Using blocks from VTEX Store Framework.
  • Importing React components from another app.
  • Importing TypeScript types from a service app.
  • Consuming GraphQL or REST definitions declared in another app.
  • Implementing a GraphQL schema interface from another app.

When you install a VTEX IO app, its dependencies are also installed on the account, but they are treated as indirect dependencies. This means they cannot declare public routes or receive public traffic directly.

Contributors
1
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page