angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.73k stars 11.98k forks source link

How to set 'publicPath' in webpack after 'deployUrl' option is deprecated in version 15 #22113

Closed feng-xiao closed 2 years ago

feng-xiao commented 2 years ago

https://github.com/angular/angular-cli/blob/5402f99f8ad20e0a57456a416a992415fc6332bd/packages/angular_devkit/build_angular/src/webpack/configs/common.ts#L335

AGuyCoding commented 2 years ago

I also need deploy URL, otherwise the chunks are not loaded correctly. APP_BASE_HREF is not the solution.

did you ever managed to work things out with omit deployUrl and using APP_BASE_HREF?

miluoshi commented 2 years ago

@benjaminadrom tey a solution posted by @ThomasDevens above. It worked for me.

AGuyCoding commented 2 years ago

@benjaminadrom tey a solution posted by @ThomasDevens above. It worked for me. thanks, but APP_BASE_HREF' useValue did not change the base href inside the generated index, so his solution as I understood was to replace those links that manually, which feels like an unnecessary hack somehow

angular-automatic-lock-bot[bot] commented 2 years ago

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.