I've developed an Angular application that loads an iframe containing a basic html page (iframe.html
) and a Vanilla JavaScript file (iframe.js
). To facilitate this, I've placed these 2 files in the assets
folder so that they are automatically copied to the dist
folder during the application build process. In my index.html file, I simply import them as:
<iframe src="assets/iframe.html"></iframe>
Everything works smoothly up to this point, but now I have a requirement to convert the iframe.js
file to TypeScript.
When it comes to building the iframe files along with the application, I can create a separate tsconfig.json
for it and execute
tsc iframe.ts && ng build
.
However, if a new developer runs just ng build
, the iframe will not be built. Is there a way to modify the ng build
script so that it also includes running tsc iframe.ts
while considering its own tsconfig.json
file?