Walkthrough: Getting started with JSS for Vue.js

Version:

This walkthrough describes how to get started with your first JSS Vue.js application.

Before you can create and run an application with JSS for Vue.js, you must first:

This walkthrough describes how to:

  • Create the application.

  • Run the application.

Create the application

To create an application with JSS for Vue.js:

  • Run the following command:

    npx create-sitecore-jss@ver<version-number> vue [--appName <your-app-name> --fetchWith [REST | GraphQL]]

    Replace <version-number> with the version you wish to use. For example, 21.

    Note

    If choosing GraphQL, your application must be connected to Sitecore. GraphQL requests are not supported in disconnected mode.

Run the application

To start your application, run one of the following scripts in a terminal, depending on your chosen development workflow:

Note

You can find script definitions in the package.json file of your new JSS Vue.js application.

  • If you do not have a Sitecore instance available, start the application in disconnected mode:

    jss start
  • If you have a Sitecore instance and want to develop against it, connect the application to the instance and start the application in connected mode:

    jss start:connected
If you have suggestions for improving this article, let us know!