mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-11-30 02:08:37 +08:00
fec607db81
Co-authored-by: Gillian97 <jinling.sunshine@gmail.com> Co-authored-by: Joel <iamjoel007@gmail.com>
10 lines
283 B
JavaScript
10 lines
283 B
JavaScript
const fs = require('node:fs')
|
|
// https://www.npmjs.com/package/uglify-js
|
|
const UglifyJS = require('uglify-js')
|
|
|
|
const { readFileSync, writeFileSync } = fs
|
|
|
|
writeFileSync('public/embed.min.js', UglifyJS.minify({
|
|
'embed.js': readFileSync('public/embed.js', 'utf8'),
|
|
}).code, 'utf8')
|