Version: 1.0.01.0.11.0.21.0.31.0.41.0.51.0.71.0.81.0.101.1.0-alpha.1a2f83bd1.1.0-alpha.263c33d71.1.0-alpha.305a98bc1.1.0-alpha.6ca16c451.1.0-alpha.7426ddf81.1.0-alpha.9879c1441.1.0-alpha.9c0779a61.1.0-alpha.c77588cb1.1.0-alpha.cd9f8cb21.1.0-alpha.cfd4bf881.1.0-alpha.e4198d8c1.1.0-alpha.e5a46e301.1.01.2.0-alpha.0369f02c1.2.0-alpha.ee48e0da1.2.01.3.0-alpha.07ab66c11.3.0-alpha.07c8adc21.3.0-alpha.2c8e73a21.3.0-alpha.4376c7f11.3.0-alpha.ae422df81.3.0-alpha.f4ad3ba81.3.01.3.1-alpha.41.3.1-alpha.71.3.1-alpha.121.3.1-alpha.131.3.1-alpha.162.0.02.0.12.0.22.1.02.1.1-alpha.52.2.02.3.02.3.1-alpha.02.3.1-alpha.12.4.02.4.1-alpha.22.4.12.4.2-alpha.102.5.03.0.0-alpha.613.0.0-alpha.673.0.0-next.593.0.0-next.603.0.0-next.673.0.03.0.1-alpha.13.0.1-next.13.1.03.1.1-next.03.2.03.3.03.3.1
const {minify} = require('terser');
const terserOptions = {
sourceMap: true,
mangle: {
// Pass true to work around the Safari 10 loop iterator bug "Cannot
// declare a let variable twice".
// https://bugs.webkit.org/show_bug.cgi?id=171041
safari10: true,
},
// Set this option to true to work around the Safari 10/11 await bug.
// https://bugs.webkit.org/show_bug.cgi?id=176685
output: {
};
/**
* Chunk transformer function called for each Rollup output chunk file.
* @param {string} source Source code.
* @return {Object}
*/
const transformChunk = function(source) {
const result = minify(source, terserOptions);
if (result.error) {
throw result.error;
}
return result;
module.exports = function() {
return {
name: 'minify',
transformChunk: transformChunk,