fix: process async entries with forceSideEffects in global mode (#18315) by samarthsinh2660 · Pull Request #20251 · webpack/webpack
…ack#18315) When usedExports is set to 'global', async entries (workers) were not being processed with forceSideEffects: true, causing CommonJS modules with self-reference dependencies to throw 'Self-reference dependency has unused export name' errors. This fix ensures async entries are always processed with forceSideEffects regardless of global mode, using undefined (global runtime) when global mode is enabled.
This was referenced
Dec 22, 2025This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters