Commands

These commands are examples to put in a real app repo. This learn run did not execute package installs or mutate _repos/.

Development

TaskExample
Start dev servernpm run dev
Build production assetsnpm run build
Preview production buildnpm run preview
Run unit testsnpm test
Run browser testsnpx playwright test

Browser And PWA Checks

CheckCommand or action
Serve over HTTPSUse production preview, localhost exception, or a trusted local cert
Inspect manifestChrome DevTools, Application, Manifest
Inspect service workerChrome DevTools, Application, Service workers
Inspect cachesChrome DevTools, Application, Cache storage
Inspect IndexedDBChrome DevTools, Application, IndexedDB
Simulate offline manuallyChrome DevTools, Application or Network offline mode
Test offline in automationPlaywright context.setOffline(true) or test option offline: true

Playwright Examples

import { test, expect } from '@playwright/test';

test.use({
  serviceWorkers: 'allow',
});

test('loads the cached app shell while offline', async ({ context, page }) => {
  await page.goto('/');
  await expect(page.getByRole('heading', { name: /ledger/i })).toBeVisible();

  await context.setOffline(true);
  await page.reload();

  await expect(page.getByText(/offline/i)).toBeVisible();
});
import { defineConfig } from '@playwright/test';

export default defineConfig({
  use: {
    permissions: ['notifications'],
    serviceWorkers: 'allow',
  },
});

Gotcha: Playwright request interception does not see requests already intercepted by a service worker. Use serviceWorkers: 'block' when testing network routing logic, and serviceWorkers: 'allow' when testing PWA behavior.

Store Packaging Commands

Do not add these until the browser PWA already works:

TargetTypical toolGate before use
Microsoft StorePWABuilder packagePartner Center account, package identity, manifest metadata
Android Play StoreBubblewrap or PWABuilder TWADigital Asset Links, signing key, Play policy check
iOS App StoreNative wrapper or WKWebView-based shellApple review policy and native value check