mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-01 19:49:30 +08:00
8 lines
256 B
Text
8 lines
256 B
Text
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;
|