0

When I compile my Vue.js application in the 'dist' folder, if I inspect the item in my browser, you can see the entire code of my application with the url or functions, which I don't want to see.

Is there any way to encrypt this code?

4
  • 1
    Anything loaded by the client will be able to be inspected. You can see the code for all websites using inspect element. Commented Jul 26, 2019 at 8:34
  • I know, but I would like to know if it is possible to encrypt this code, especially hide the API and functions for security reasons. Commented Jul 26, 2019 at 8:38
  • take a look at this answer from a similar post - stackoverflow.com/a/2834514/9772148 Commented Jul 26, 2019 at 8:49
  • For security reasons- assume anything on the client is public knowledge and design accordingly Commented Jan 1, 2024 at 0:16

1 Answer 1

0

I think you are talking about obfuscating your code.

In cryptography, encryption is the process of transforming information (referred to as plaintext) using an algorithm (called a cipher) to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key. So encryption makes data “unreadable” whereas obfuscation makes it “difficult”.

There are several ways to obfuscate your code. Here's an example: https://blog.jscrambler.com/how-to-protect-your-vue-js-application-with-jscrambler/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.