Using terser or alternative to minify and uglify js files

Viewed 1585

I have a simple web project with one big javascript file (ES6) i want to minify and uglify it so it will be harder for others to obtain it

After a bit of searching i found terser

and i've been using it in the following way

terser originalFile.js --compress --mangle --output result.min.js

when i come to examine the output file created i do notice that its minified (no white spaces) but its not uglified in fact doing auto format to it returns it to the original and readable state

how can i uglify my file without using webpacks or anything like this

Thanks

0 Answers
Related