Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy

This commit is contained in:
Nuckyz 2024-05-29 05:12:14 -03:00
commit d5440349c9
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -377,8 +377,8 @@ function patchFactory(id: PropertyKey, factory: ModuleFactory) {
// There are (at the time of writing) 11 modules exporting the window
// Make these non enumerable to improve webpack search performance
if (require.c && (exports === window || exports?.default === window)) {
Object.defineProperty(require.c, id, {
if ((exports === window || exports?.default === window) && typeof require === "function" && require.c != null) {
define(require.c, id, {
value: require.c[id],
enumerable: false
});