mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-06 08:47:58 +02:00
safety
This commit is contained in:
11
tools/lib/jsx-shim.js
Normal file
11
tools/lib/jsx-shim.js
Normal file
@@ -0,0 +1,11 @@
|
||||
// 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 {};
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user