1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-01-29 19:57:35 +01:00
BezierInfo-2/tools/lib/jsx-shim.js
2017-03-26 11:24:40 -07:00

12 lines
315 B
JavaScript

// shim nodejs so that it "knows" what to do with jsx files:
// namely just return empty objects.
var Module = require('module');
var originalRequire = Module.prototype.require;
Module.prototype.require = function() {
try {
return originalRequire.apply(this, arguments);
} catch (e) {
return {};
}
};