next-cloudflare/stages/compressPage.js

14 lines
240 B
JavaScript
Raw Permalink Normal View History

2019-02-18 07:55:52 +00:00
const terser = require('terser');
const compressPage = (page) =>
terser.minify(page, {
toplevel: true,
compress: {
passes: 3,
unsafe: false,
pure_getters: true,
},
}).code;
module.exports = compressPage;