Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
This commit is contained in:
commit
d5440349c9
|
@ -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
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue