[PR #30426] fix: migrate to @ducanh2912/next-pwa to fix babel-loader issue #32809

Closed
opened 2026-02-21 20:52:07 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/30426

State: closed
Merged: No


Description

This PR solves a build failure in the web directory where babel-loader could not be resolved.

Cause

The previous PWA plugin, next-pwa (v5.6.0), is unmaintained and implicitly relies on babel-loader and Webpack-specific configurations that conflict with Next.js 15s default Turbopack/SWC compiler setup.

Fix

Migrated to @ducanh2912/next-pwa, an actively maintained fork that supports Next.js 15 and works correctly without requiring a Babel configuration.

Changes

  • Replaced next-pwa with @ducanh2912/next-pwa in package.json.
  • Updated import in web/next.config.js.

Verification

  • Ran pnpm build in web/ directory.
  • Build completes successfully.
**Original Pull Request:** https://github.com/langgenius/dify/pull/30426 **State:** closed **Merged:** No --- ## Description This PR solves a build failure in the web directory where babel-loader could not be resolved. ### Cause The previous PWA plugin, next-pwa (v5.6.0), is unmaintained and implicitly relies on babel-loader and Webpack-specific configurations that conflict with Next.js 15s default Turbopack/SWC compiler setup. ### Fix Migrated to @ducanh2912/next-pwa, an actively maintained fork that supports Next.js 15 and works correctly without requiring a Babel configuration. ### Changes - Replaced next-pwa with @ducanh2912/next-pwa in package.json. - Updated import in web/next.config.js. ### Verification - Ran pnpm build in web/ directory. - Build completes successfully.
yindo added the pull-request label 2026-02-21 20:52:07 -05:00
yindo closed this issue 2026-02-21 20:52:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32809