the-forest/client/node_modules/rollup-plugin-terser/transform.js
2024-09-17 20:35:18 -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;