This guide focuses on installing hubble PWA as a Nuxt.js module only, so before moving on, make sure you meet the requirements first.
Install from scratch including fully configured Nuxt.js project
Install via npx so everything is set up correctly and ready to use. The script prompts you to enter the access data for the api:
npx @hubblecommerce/launcher <project-name>
or enter your API url and key directly as additional parameters:
npx @hubblecommerce/launcher <project-name> <api-url> <api-key>
Install to existing Nuxt.js project
- Install hubble NuxtJs Module
npm i @hubblecommerce/hubble
- Add module to nuxt.config.js
modules: [ ['@hubblecommerce/hubble'] ],
Module have to be registered in modules, not buildModules to make sure runtime configurations work.
- Edit configs in .env file
API_SW_ACCESS_KEY = '' API_BASE_URL = ''
Read more about where to get the credentials in the supported e-commerce platforms section.
npm run dev
npm run build npm start