Description: fir terser use
Author: Yadd <yadd@debian.org>
Bug-Debian: https://bugs.debian.org/1026108
Forwarded: not-needed
Last-Update: 2022-12-15

--- a/scripts/build.js
+++ b/scripts/build.js
@@ -48,7 +48,7 @@
     .then(bundle => bundle.generate(output))
     .then(({ output: [{ code }] }) => {
       if (isProd) {
-        const minified = (banner ? banner + '\n' : '') + terser.minify(code, {
+        terser.minify(code, {
           toplevel: true,
           output: {
             ascii_only: true
@@ -56,8 +56,10 @@
           compress: {
             pure_funcs: ['makeMap']
           }
-        }).code
-        return write(file, minified, true)
+        })
+        .then(minified => {
+          return write(file, minified.code, true)
+        })
       } else {
         return write(file, code)
       }
