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:
Deploying requires an account on Layer0. Sign up here for free.
If you have not already done so, install the Layer0 CLI
npm i -g @layer0/cli # yarn global add @layer0/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
In the root directory of your project run
The Layer0 init command should have automatically moved all your
buildModules in order to deploy the smallest possible build to Layer0.
@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
To build and deploy your app to Layer0, run the following from the root directory of your app: