vendor/nexe/exe.js
function _monkeyPatchGyp(compiler, options, complete) {
  const hasNexeres = options.resourceFiles.length > 0;
  const gypPath = path.join(compiler.dir, 'node.gyp');
  let replacementString = "'lib/fs.js', 'lib/_third_party_main.js', ";

  if (hasNexeres) {
    replacementString += "'lib/nexeres.js', ";
  }

  _monkeypatch(
    gypPath,
    function(content) {
      return ~content.indexOf('lib/_third_party_main.js');
    },
    function(content, next) {
      content = content.replace("'lib/fs.js',", replacementString);
      content = content.replace(
        "'deps/node-inspect/lib/internal/inspect_repl.js',",
        `'deps/node-inspect/lib/internal/inspect_repl.js',
      'google-closure-compiler-js.js',`,
      );

      next(null, content);
    },
    complete,
  );
}
function _monkeyPatchGyp(compiler, options, complete) {
  const hasNexeres = options.resourceFiles.length > 0;
  const gypPath = path.join(compiler.dir, 'node.gyp');
  let replacementString = "'lib/fs.js', 'lib/_third_party_main.js', ";

  if (hasNexeres) {
    replacementString += "'lib/nexeres.js', ";
  }

  _monkeypatch(
    gypPath,
    function(content) {
      return ~content.indexOf('lib/_third_party_main.js');
    },
    function(content, next) {
      content = content.replace("'lib/fs.js',", replacementString);
      content = content.replace(
        "'deps/node-inspect/lib/internal/inspect_repl.js',",
        `'deps/node-inspect/lib/internal/inspect_repl.js',
      'google-closure-compiler-js.js',`,
      );

      next(null, content);
    },
    complete,
  );
}
function _monkeyPatchGyp ( compiler , options , complete ) { const hasNexeres = options . resourceFiles . length > 0 ; const gypPath = path . join ( compiler . dir , 'node.gyp' ) ; let replacementString = "'lib/fs.js', 'lib/_third_party_main.js', " ; if ( hasNexeres ) { replacementString += "'lib/nexeres.js', " ; } _monkeypatch ( gypPath , function ( content ) { return ~ content . indexOf ( 'lib/_third_party_main.js' ) ; } , function ( content , next ) { content = content . replace ( "'lib/fs.js'," , replacementString ) ; content = content . replace ( "'deps/node-inspect/lib/internal/inspect_repl.js'," , ` ` , ) ; next ( null , content ) ; } , complete , ) ; }
patch the gyp file to allow our custom includes
patch the gyp file to allow our custom includes