Obfuscate JS Code ES6

Asked

Viewed 323 times

-1

What is the most appropriate way to obfuscate code created using JS ES6 for use within electronjs?

  • When you do "deploy" technically it’s 'inaccessible', unless someone reverse engineered it, or I’m mistaken?

  • Exactly, because if you unzip the . bake all the code will be there, readable. And Uglify can’t work with the ES6 even using the Harmony

  • have you tried https://www.npmjs.com/package/enclose? Generates an application from your project, I never really used, I hope it will serve :)

1 answer

0

I do not master this tool (electronjs), but for general use, independent of Electron I believe that what you are looking for is this:

To install (globally):

npm install uglify-js -g

The usage command would be this:

uglifyjs --compress --mangle arquivo-original.js

Adding several:

uglifyjs src/arquivo-original1.js \
         src/arquivo-original2.js \
         -o dist/projeto.min.js \
         --compress --mangle
  • 1

    I have but it.presents some problems with require and const

Browser other questions tagged

You are not signed in. Login or sign up in order to post.