diff --git a/lib/getImportGlobalsSrc.js b/lib/getImportGlobalsSrc.js index fcce0d0..da3acb2 100644 --- a/lib/getImportGlobalsSrc.js +++ b/lib/getImportGlobalsSrc.js @@ -13,20 +13,22 @@ function getImportGlobalsSrc(ignore) { globalObj = typeof global === "undefined"? window: global; ignore = ignore || []; - // global itself can't be overridden because it's the only reference to our real global objects - ignore.push("global"); - // ignore 'module', 'exports' and 'require' on the global scope, because otherwise our code would - // shadow the module-internal variables - // @see https://github.com/jhnns/rewire-webpack/pull/6 - ignore.push("module", "exports", "require"); - // strict mode doesn't allow to (re)define 'undefined', 'eval' & 'arguments' - ignore.push("undefined", "eval", "arguments"); - // 'GLOBAL' and 'root' are deprecated in Node - // (assigning them causes a DeprecationWarning) - ignore.push("GLOBAL", "root"); - // 'NaN' and 'Infinity' are immutable - // (doesn't throw an error if you set 'var NaN = ...', but doesn't work either) - ignore.push("NaN", "Infinity"); + ignore.push( + // global itself can't be overridden because it's the only reference to our real global objects + "global", + // ignore 'module', 'exports' and 'require' on the global scope, because otherwise our code would + // shadow the module-internal variables + // @see https://github.com/jhnns/rewire-webpack/pull/6 + "module", "exports", "require", + // strict mode doesn't allow to (re)define 'undefined', 'eval' & 'arguments' + "undefined", "eval", "arguments", + // 'GLOBAL' and 'root' are deprecated in Node + // (assigning them causes a DeprecationWarning) + "GLOBAL", "root", + // 'NaN' and 'Infinity' are immutable + // (doesn't throw an error if you set 'var NaN = ...', but doesn't work either) + "NaN", "Infinity", + ); const globals = Object.getOwnPropertyNames(globalObj);