Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specify a prefix for the src tag in index.html

In using angular-cli and ng build to build my project, I have a couple of questions.

  1. The container that I'm running the angular screen in I need to put a prefix in front of the src tags in the script tag. so src="styles.bundle.js" needs to be src="/my/prefix/styles.bundle.js". Is there a way to do this command line, and not a manual edit? I tried to set the base href, but that did not seem to help.

  2. If I have no production specific environment changes, is there any difference between dev & production builds.

like image 698
GR Envoy Avatar asked Oct 21 '25 04:10

GR Envoy


1 Answers

Working well for us using this

ng build --deploy-url=prefixfolder
like image 134
CKGrafico Avatar answered Oct 23 '25 18:10

CKGrafico