Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
294 views
in Technique[技术] by (71.8m points)

angular - Change file path during ng build

On running ng build I want my bundle files within index.html to be linking to src="/static/<bundle file name>.js" instead of just src="<bundle file name>.js" as it is part of a Django backend. Previously we had it in separate repositories running independently but now we are planning to have it running on one server.

Currently we have a tiny script to update the path and add the base Django path "/static/" as a prefix and it works as it is.

I want to know if this is possible with ng build itself without any additional scripts.

I tried using --output-path but that simply moves all files to a different directory.

question from:https://stackoverflow.com/questions/65933437/change-file-path-during-ng-build

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...