1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-08 08:14:48 +00:00
This commit is contained in:
zumbiepig 2024-09-06 20:55:30 -07:00
parent 40ae2c8f5f
commit 30484e32c2
No known key found for this signature in database
GPG Key ID: 17C891BE28B953DE

View File

@ -76,10 +76,11 @@ if (!isDev) {
console.log(chalk.cyan('Obfuscating JavaScript...\n')); console.log(chalk.cyan('Obfuscating JavaScript...\n'));
bundleFiles.forEach((file) => { bundleFiles.forEach((file) => {
const outputPath = file.replace(new RegExp(`^${srcDir}`), publicDir);
writeFileSync( writeFileSync(
file, outputPath,
javascriptObfuscator javascriptObfuscator
.obfuscate(readFileSync(file, 'utf-8'), { .obfuscate(readFileSync(outputPath, 'utf-8'), {
optionsPreset: 'high-obfuscation', optionsPreset: 'high-obfuscation',
target: 'browser', target: 'browser',
}) })