When working with Angular, the definition of "webpack_public_path" or "webpack_require.p" for a project can be done in multiple ways:
- By setting the deployUrl in the .angular-cli.json file
- By adding --deployUrl "some/path" to the "ng build" command line
However, there is a need to dynamically set this value so that it is fetched from the assets/config.json file when the application starts. One possible approach is as follows, potentially defined in the main.ts file, yet all attempts have failed:
__webpack_require__.p=window.config['deployUrl'];
If anyone knows how to achieve this, any guidance would be highly appreciated! Thank you!