Hide typescript code on devices


#1

Hi all,
when I deploy an Ionic app on a device its code is visible.
Is there a way to deploy a sort of “compiled” version of the app so that the code is not readable?

Thank you very much

Claudio


#2

Visible where and how? On what device?


#3

Build with the prod flag, and the build process will automatically run your code through uglify.js.


#4

Even I can see my complete code in chrome://inspect/#devices
will --prod hide the code? or kind of scramble? for security.


#5

Read the Gifhub ReadMe page for uglify.js, and you’ll see what it does.


#6

Philipgriffin I know that there are Apps that lets you to get .apk of another App and tools that you can use to download from a store the .apk of an app. So, in theory, you could get the src of these Apps. But Aaron says that with the prod flag it is used uglify.js. I’ll try it. Thank you.


#7

In the end its just js in a webview, so your app code will be visible to everyone. --prod will condense it a bit but it is still visible.