Follow these steps to deploy a Vue Storefront 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.
This framework has a connector developed for Layer0. See Connectors for more information.
Layer0 only supports Node.js version 14.x
If you do not have Node.js installed on your system, download and install it from the official Node.js v14.x downloads page. Select the download that matches your operating system and run the installer. Note that the installer for Node.js will also install npm.
Note that while you can use any version of Node.js >= 14 locally, your app will run in Node 14 when deployed to the Layer0 cloud. Therefore we highly suggest using Node 14 for all development.
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
To prepare your Vue Storefront app for deployment on Layer0, run the following commands in the root folder of your project:
npm install -g @layer0/cli layer0 init
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:
layer0 dev --cache
To build and deploy your app to Layer0, run the following from the root directory of your app: