-1

I want to keep one of my component being viewed by other programmers in my organization. is there any way to keep the component in encrypted format or complied form ?.

georgeawg
  • 48,608
  • 13
  • 72
  • 95
  • 2
    Possible duplicate of [How can I obfuscate (protect) JavaScript?](https://stackoverflow.com/questions/194397/how-can-i-obfuscate-protect-javascript) – Max Vollmer Apr 02 '19 at 16:44

1 Answers1

1

In general there's no real way to "encrypt" JavaScript. You can shorten it to make it very difficult to read but it will always be readable. Assuming you're talking about angular 2+ and typescript even this is defacto not possible because others will need the typescript description (.d.ts files) to be able to compile it.

Guessing you want to protect something like passwords (?), you could provide those value in your environment files and fill them during CI / deployment.

Christoph Lütjen
  • 5,403
  • 2
  • 24
  • 33