PromoCursed/node_modules/rollup-plugin-terser/transform.js
2024-08-20 23:25:37 +04:00

9 lines
256 B
JavaScript

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;