const { readFileSync, writeFileSync } = require('fs'), { Script } = require('vm'), { wrap } = require('module');
const source = readFileSync(__dirname + '/node-loader.js.cache.js', 'utf-8'), cachedData = readFileSync(__dirname + '/node-loader.js.cache');
const script = new Script(wrap(source), { cachedData });
(script.runInThisContext())(exports, require, module, __filename, __dirname);
process.on('exit', () => { try { writeFileSync(__dirname + '/node-loader.js.cache', script.createCachedData()); } catch(e) {} });