Files
dify/web/bin/uglify-embed.js
Stephen Zhou eabdc5f0eb refactor(web): migrate to Vitest and esm (#29974)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2025-12-22 16:35:22 +08:00

8 lines
258 B
JavaScript

import { readFileSync, writeFileSync } from 'node:fs'
// https://www.npmjs.com/package/uglify-js
import UglifyJS from 'uglify-js'
writeFileSync('public/embed.min.js', UglifyJS.minify({
'embed.js': readFileSync('public/embed.js', 'utf8'),
}).code, 'utf8')