Back to ⚡ Performance & Optimization

Setup Service Worker for Offline

PWAOfflineService Worker
---
description: Enable offline functionality
---

1. **Install Workbox**:
// turbo
- Run npm install next-pwa

2. **Configure**:
const withPWA = require('next-pwa')({
dest: 'public'
});
module.exports = withPWA({});


3. **Create Manifest**:
{
"name": "My App",
"short_name": "App",
"start_url": "/",
"display": "standalone"
}


4. **Pro Tips**:
- Test in Chrome DevTools.
- Cache static assets.
By Antigravity Team

How to Use This Workflow

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/workflows/
  3. Save the file as setup-pwa-service-worker-offline-support.md
  4. In Antigravity, type /setup_pwa_service_worker_offline_support or just describe what you want to do

Learn more about workflows →

Related Workflows

Recommended Rules

View more rules →

Recommended MCP Servers

View more MCP servers →

Take It Further

Maximize your productivity with these powerful resources

📋

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
📖

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide