import { isEventHandler, optionalImport } from '../helpers.mjs'; import { redundantScriptTypes } from './removeRedundantAttributes.mjs'; /** Minify JS with Terser */ export default async function minifyJs (tree, options, terserOptions) { const terser = await optionalImport('terser'); if (!terser) return tree; let promises = []; tree.walk(node => { const nodeAttrs = node.attrs || {}; /** * Skip SRI * * If the input