katoikia-app/web-ui/web-react/node_modules/terser-webpack-plugin/dist/worker.js

19 lines
594 B
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
"use strict";
const minify = require('./minify');
function transform(options) {
// 'use strict' => this === undefined (Clean Scope)
// Safer for possible security issues, albeit not critical at all here
// eslint-disable-next-line no-new-func, no-param-reassign
options = new Function('exports', 'require', 'module', '__filename', '__dirname', `'use strict'\nreturn ${options}`)(exports, require, module, __filename, __dirname);
const result = minify(options);
if (result.error) {
throw result.error;
} else {
return result;
}
}
module.exports.transform = transform;