Skip to content

Turbopack support: plugin breaks production builds on Next.js 16+ #174

Description

@rafaelbarross

Problem

@ducanh2912/next-pwa uses workbox-webpack-plugin internally, which injects webpack configuration. Starting with Next.js 16, Turbopack is the default bundler for both dev and production builds (next build).

This causes the following error on next build:

⨯ ERROR: This build is using Turbopack, with a `webpack` config and no `turbopack` config.

This may be a mistake.

The build then fails with:

Error: Call retries were exceeded
    at ignore-listed frames {
  type: 'WorkerError'
}

Workaround

Force webpack for production builds:

// package.json
"build": "next build --webpack"

This works but loses the Turbopack build speed improvements (~30–60% faster builds).

Expected

The plugin should support Turbopack builds, or at minimum document the --webpack workaround for Next.js 16+ users.

Environment

  • @ducanh2912/next-pwa: 10.2.9
  • next: 16.0.7
  • Node.js: (Windows 11)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions