Keep function names in one file. App Scripts, webpack

Hi! I have basically a javascript class with variables and some functions in one typescript file that is exported. However is use some imports in this file so I can not create a standalone jsfile. I am using ionic app scripts to build my app and when I run --prod, the function names change, of course they get minified. Is it possible somehow to keep the functionnames or keep this file from being minified?

Could you elaborate on what you actually have? I am not sure I understood 100%. Thanks.

Okey, so I will try to explain. I am building this app with forms that are autogenerated. When some fields change a script has to be run. This script is not in the app as it would be hard to maintain. (e.g., update the app as soon as the script is changes) So when a field changes it runs a function calls runScript(form);

This function is a so called ”javascript-class”. It has functions inside it such as setToRequired, setFieldValue.
Then the function runs eval on the script that is ”outside the app”. Yeah, i know eval is evil. But the only code that is run is our own. (And i have to, cause its a job :))

This code that is run with eval(evil) runs the functions such as setToRequired. Therefore the functions names in this class can not change. So it is possible to set some variable/flag when ionic app script is run so it won’t minify this file?

How are you “calling out” to that script in your TS code? How do you make TS not complain that it doesn’T know these functions and class?

export function runScript(form, script){
   let setFieldValue = function(id, value){
   return form;
import { runScript } from "scripts.ts";

  this.form = runScript(this.form, script);

form.ts is from a page?
Where is the JS file and class? Where do you embed/import it and what object in these .ts is using something from there?