if (require) {
let oldRequire = require;
let fakeRequire: NodeRequireFunction = (id: string): any => {
if (id === 'sander') {
return new FakeSander();
}
return oldRequire(id);
};
let { cache, extensions, main, resolve } = require;
require = <NodeRequire>Object.assign(fakeRequire, { cache, extensions, main, resolve });
}