From 4b2c228042e4db51bbb68d8592c9afc3fce7e9eb Mon Sep 17 00:00:00 2001 From: Steve Eardley Date: Mon, 15 Jan 2024 15:07:38 +0000 Subject: [PATCH] update build script so uglify can gather all files --- build.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 720e18d5..251bbc6d 100644 --- a/build.js +++ b/build.js @@ -307,8 +307,9 @@ if (args.bundle && typeof bundle === 'object') { } } if (js.length) { - var uglify = require("uglify-js"); - uglyjs = uglify.minify(js); + const uglify = require("uglify-js"); + const path = require('path'); + uglyjs = uglify.minify(js.map(_path => JSON.stringify(path.normalize(_path)))); uglyjs.error ? console.log(uglyjs.error) : ( jshash = 'bundled_' + crypto.createHash('md5').update(uglyjs.code).digest("hex"), fs.writeFileSync('./serve/static/' + jshash + '.min.js', uglyjs.code)