Permalink
Browse files

Probably the worst form of hiding require programmatically, see #527

  • Loading branch information...
dcodeIO committed Dec 8, 2016
1 parent 4462d8b commit 9bdec62793ce77c954774cc19106bde4132f24fc
Showing with 9 additions and 13 deletions.
  1. +3 −5 dist/protobuf.js
  2. +1 −1 dist/protobuf.js.map
  3. +3 −3 dist/protobuf.min.js
  4. BIN dist/protobuf.min.js.gz
  5. +1 −1 dist/protobuf.min.js.map
  6. +1 −3 src/util.js

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
BIN +69 Bytes (100%) dist/protobuf.min.js.gz
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -98,9 +98,7 @@ util.asPromise = asPromise;
function fetch(path, callback) {
if (!callback)
return asPromise(fetch, util, path);
var fs; try { fs = Function('r', 'return r("fs")')(require); } catch (e) { } // eslint-disable-line no-new-func, no-empty
if (fs && fs.readFile)
return fs.readFile(path, "utf8", callback);
try { return eval(['req','uire'].join(''))("fs").readFile(path, "utf8", callback); } catch (e) { } // eslint-disable-line no-empty, no-eval
var xhr = new XMLHttpRequest();
function onload() {
if (xhr.status !== 0 && xhr.status !== 200)

0 comments on commit 9bdec62

Please sign in to comment.