-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Bug report
What is the current behavior?
When an entry module contains a local override of const Symbol = 'Symbol' and the compilation contains the runtime module makeNamespaceObject (i.e. __webpack_require__.r), the scope analysis doesn't rename the shadowing Symbol variable and results in the global Symbol in the runtime module being replaced with the local variable.
If the current behavior is a bug, please provide the steps to reproduce.
Have an entry module that shadows the global Symbol.
Require the makeNamespaceObject (__webpack_require__.r) runtime module.
What is the expected behavior?
Entry modules need to rename any globals that they shadow if optmization.avoidEntryIife = true.
Other relevant information:
webpack version: 5.95.0
Node.js version: 18.19.1
Operating System: Linux
Additional tools: