Angular-cli: how to set the root path for production

Created on 16 Feb 2017  路  5Comments  路  Source: angular/angular-cli

on my prod server the app is hosted under "some-folder".

i would like that the build generated index.html will refer src scripts and styles to "some-folder"

<script type="text/javascript" src="some-folder/inline.bundle.js"></script>
<script type="text/javascript" src="some-folde/vendor.bundle.js"></script>
<script type="text/javascript" src="some-folder/main.bundle.js"></script>

Most helpful comment

tiny fix: --prod instead of -prod

ng build --prod --base-href="/some-folder/"

All 5 comments

Try

ng build -prod --base-href="/some-folder/"

thanks,

as .netGuro maybe you know how to use angular cli with vs2015 ? (question is not relation to this thread)

Closing as answered. Thanks @Meligy !

tiny fix: --prod instead of -prod

ng build --prod --base-href="/some-folder/"

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings