You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Webpack crashes during bundle generation when an unused CommonJS namespace contains a function that reads one of its own exports. The reduced reproduction uses three small source files and has no runtime dependencies.
The error occurs with production usedExports optimization and a side-effect-free package:
Self-reference dependency has unused export name: This should not happen
Link to Minimal Reproduction and step to reproduce
The reproduction also fails with webpack 5.26.3, 5.40.0, 5.50.0, 5.60.0, 5.70.0, 5.75.0, and 5.107.2. Disabling optimization.usedExports makes it succeed.
This may be related to #13983 and #18315, but this case does not use workers or usedExports: "global".
The issue was reduced from an OpenTelemetry package graph, but the final reproduction contains no OpenTelemetry dependency.
AI assistance was used to organize this report. I reviewed the reproduction, commands, and technical details.
Activity
hai-x commentedon Aug 6, 2026
Hi, thanks for report, the fixing is WIP.