For my Angular project, I'm facing the task of compiling a separate "script.js" file that is referenced in index.html. This script needs to be generated from multiple *.ts files imported into one main file called "script.ts". I am looking to store this output script.js in the same folder as other compiled files such as main.js and styles.js. Additionally, I want to ensure that "script.js" gets recompiled whenever I save the Angular project.
I attempted tweaking some settings within tsconfig.json and angular.json, but I couldn't quite grasp how to modify them to achieve the desired outcome.