Hide typescript code on devices

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


Visible where and how? On what device?

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

1 Like

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

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

1 Like

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.

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.