Open chrisguttandin opened 5 years ago
The main intentional of that option is to allow the renaming the index file and support of custom build and staging setups. These generally have a variety of additional options in use as well as custom pre/post processing steps. Modifying the content could cause such setups to fail. There is the potential to add an extra option that supports your scenario however the amount of usage may not warrant the long term cost of an additional option. Added the issue to the team discussion list.
Thanks for the quick response @clydin.
Sorry, I didn't know that this was intended to only rename the file.
In case we would resolve the paths of all tags relative to the new location of the index.html
that wouldn't change anything for anybody who just renames the file if I understand the concept correctly.
At this point we're in a bit of a bind: we never intended that option to be used to move the file elsewhere, but we also didn't validate that it wouldn't.
Strictly speaking the bug is that we didn't validate the path but removing it now might affect some people so it might be better to not do anything.
Actually trying to support the new path would be a bigger endeavor for the reasons Charles listed. We want to come up with a better story for all things base href related, but don't yet have it.
Thanks for looking into it.
Please don't worry too much about it. I just came across this and thought it's inconsistent and should be addressed. But I fully understand if you think it doesn't make sense to do so. Feel free to close this issue if you like.
English is not my native language. I haven't seen this file since 2019. Sorry. Not know what to do .
🐞 Bug report
Command
Is this a regression?
I don't know for sure, but I don't think so.
Description
The CLI currently allows to modify the output path of the
index.html
file. This works fine. Unfortunately it only modifies the output path and doesn't modify the file paths which are used inside theindex.html
file to reference the JavaScript files.🔬 Minimal Reproduction
npx @angular/cli new my-project
angular.json
atprojects > my-project > architect > build > index
ng build
dist/my-project/subdirectory/index.html
🔥 Exception or Error
It doesn't throw an error.
🌍 Your Environment
Anything else relevant?
I'm happy to provide a pull request for this if you agree that this is a bug.