transform.js 256 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 const { minify } = require("terser"); const transform = (code, optionsString) => { const options = eval(`(${optionsString})`); return minify(code, options).then(result => ({ result, nameCache: options.nameCache })); }; exports.transform = transform;