Skip to content

Commit

Permalink
remove unnecessary stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Jan 15, 2024
1 parent 32ef90e commit c22be33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ if (args.bundle && typeof bundle === 'object') {
if (js.length) {
const uglify = require("uglify-js");
const path = require('path');
uglyjs = uglify.minify(js.map(_path => JSON.stringify(path.normalize(_path))));
uglyjs = uglify.minify(js.map(_path => 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)
Expand Down

0 comments on commit c22be33

Please sign in to comment.