'Include an external JavaScript file as-is in Angular dist folder

I have an external npm module that looks for a specific file in the app's root directory (in the case of Angular, the dist/ folder). A relatively simple solution is to put that file there. However, I don't know of a way to do it: putting the path to the file in angular.json under scripts simply includes the script in main.js. Putting it under assets wouldn't solve this specific case either.

Is it possible to configure the built to include it in the dist folder as-is? (Angular 8)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source