4

I have one angular-cli application, when i give ng build command it creates build file which has index.html file.

In index.html file, scripts paths are referred like below:

<script type="text/javascript" **src="runtime.js"**></script>
<script type="text/javascript" **src="polyfills.js"**></script>
<script type="text/javascript" **src="styles.js"**></script>
<script type="text/javascript" **src="vendor.js"**></script>
<script type="text/javascript" **src="main.js"**></script>

But i want to change that script like below,

<script type="text/javascript" **src="~/runtime.js"**></script>
<script type="text/javascript" **src="~/polyfills.js"**></script>
<script type="text/javascript" **src="~/styles.js"**></script>
<script type="text/javascript" **src="~/vendor.js"**></script>
<script type="text/javascript" **src="~/main.js"**></script>

Is it possible to change the path without using find and replace method?

Kumaresan Sd
  • 1,399
  • 4
  • 16
  • 34

1 Answers1

8

I have found answer for my question in here [ Modify the src location for javascript script tags during ng build ].

Please check here

"deployUrl": "/app/", this property helps me to achieve my requirement

Kumaresan Sd
  • 1,399
  • 4
  • 16
  • 34