Oct 17, 2024
Creating a New Project:
npx nuxi init <project-name>
npx nuxi init next3PWA
Installing Dependencies:
yarn
npm install
Running the Project:
yarn dev
or npm run dev
localhost:3000
Service Worker & Manifest:
Using Nuxt PWA Module:
vite-plugin-pwa
for integration.vite-plugin-pwa
in nuxt.config.ts
.Configuring the Manifest:
manifest: {
name: 'Nux3PWA',
short_name: 'NuxPWA',
description: 'Testing Nux3 PWA',
icons: [
{ src: 'icons/icon-144x144.png', sizes: '144x144', type: 'image/png' },
{ src: 'icons/icon-192x192.png', sizes: '192x192', type: 'image/png' },
{ src: 'icons/icon-512x512.png', sizes: '512x512', type: 'image/png' },
],
theme_color: '#FFFFFF',
background_color: '#FFFFFF',
}
Adding Icons:
vite-plugin-pwa
and configured it in nuxt.config.ts
.