Skip to content

Commit

Permalink
Merge branch 'wnr-rn57'
Browse files Browse the repository at this point in the history
  • Loading branch information
drapanjanas committed Dec 3, 2018
2 parents a51cde9 + c38327a commit 0fe94c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions resources/figwheel-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,17 @@ function importJs(src, success, error) {
}

function interceptRequire() {
var oldRequire = window.require;
var oldRequire = window.__r;
console.info("Shimming require");
window.require = function (id) {
function newRequire (id) {
console.info("Requiring: " + id);
if (externalModules[id]) {
return externalModules[id];
}
return oldRequire(id);
};
}
window.require = newRequire;
window.__r = newRequire;
}

function serverBaseUrl(host) {
Expand Down

0 comments on commit 0fe94c0

Please sign in to comment.