I am working on POC where we have to package angular dist folder in spring mvc based web application(single war). This will be deployed in weblogic and tomcat. War file will serve the static content which is angular 2 app.
Now what i noticed is that when angular-cli builds the app, it is updating index.html with "script" tag to point to generated "js" files. I want to customize this script tag so that i can add "context" name in the url.
Is this something can be done? Or If I have to use webpack, does webpack support this customization?
here is example of script tag i would like to add during angular-cli build process
<script type="text/javascript" src="<CONTEXT-NAME>/inline.bundle.js"></script>
@angular-builders/custom-webpack allows you to customize Angular build.
indexTransform option allows you to modify index.html (including script tags).
Disclaimer: I'm the owner of this project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With