Vue Storefront Next

Follow these steps to deploy a Vue Storefront Next app on Layer0. As of now Layer0 is only compatible with the Vue Storefront Next CLI tool.

For adding Layer0 to Vue Storefront 1 app follow this guide.


Here’s an example Vue Storefront 2 app running on Layer0:

Sign up for Layer0

Deploying requires an account on Layer0. Sign up here for free.

Install the Layer0 CLI

If you have not already done so, install the Layer0 CLI

npm i -g @layer0/cli # yarn global add @layer0/cli

Install the VSF CLI

The Vue Storefront CLI tool will generate a preconfigured boilerplate project for you. Use these commands to create a new project and update to the latest dependencies.

npm i -g @vue-storefront/cli@next
vsf init <project-name>
cd <project-name>
npm install

Configuring your Vue Storefront app for Layer0

Initialize your project

In the root directory of your project run 0 init:

0 init

The Layer0 init command should have automatically moved all your modules to buildModules in order to deploy the smallest possible build to Layer0.

Ensure @nuxtjs/pwa is not present in the buildModules. It is not needed because @layer0/nuxt/module builds and injects its own service worker.


To run locally in development mode, use this command:

0 dev --cache

Building and Deploying

To build and deploy your app to Layer0, run the following from the root directory of your app:

0 deploy