Installation
Prerequisites
This guide focuses on installing hubble PWA as a Nuxt.js module only, so before moving on, make sure you meet the requirements first.
Installation
- Create a new Nuxt 4 Project
npx nuxi init nuxt-app
cd nuxt-app
npm install
# Resolve pinia dependency issue
npm i pinia -f
- Install the hubble Nuxt module
npm i @hubblecommerce/hubble
- Add the module to nuxt.config.ts
export default defineNuxtConfig({
modules: [
'@hubblecommerce/hubble'
]
})
- Create a .env file in project root and fill your Shopware 6 credentials
PLATFORM_BASE_URL = 'https://your-shopware-store.com'
API_BASE_URL = 'https://your-shopware-store.com/store-api'
API_SW_ACCESS_KEY = 'your-sales-channel-access-key'
API_CLIENT_ID = 'your-client-id'
API_CLIENT_SECRET = 'your-client-secret'
Tips
Read more about where to get the credentials in the supported e-commerce platforms section.
Build modes
Development
npm run dev
Production
npm run build
node .output/server/index.mjs