Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back --deploy-url #26357

Closed
jsloyer opened this issue Nov 14, 2023 · 6 comments
Closed

Bring back --deploy-url #26357

jsloyer opened this issue Nov 14, 2023 · 6 comments

Comments

@jsloyer
Copy link

jsloyer commented Nov 14, 2023

Command

build

Description

With Angular 16 you could build your app with ng build --build-href=/my/awesome/app --deploy-url=/my/awesome/app, this was incredibly useful for SSR and Universal. Static assets and the node SSR server would run under the same URI's and assets and SSR functionality get served together.

With Angular 17 --deploy-url was removed. The explanation at #23765 (comment) makes sense for a CSR app but not a SSR or SSG app. The docs mention using APP_BASE_HREF and base-href but those URI's together do not move assets like main.js, polyfills.js, and styles.js to /my/awesome/app.

I understand if this was intentional but would love some documentation on a path forward here. Obviously one solution would be to use Nginx and rewrite URL's on the fly. If that is the official path, happy to do it but would love some guidance

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

@benbro
Copy link

benbro commented Nov 15, 2023

I was using webpack_public_path with the webpack builder to set the url dynamically. esbuild doesn't support such setting.

@jsloyer
Copy link
Author

jsloyer commented Nov 15, 2023

@benbro got any code examples on your config? 😀

@alan-agius4
Copy link
Collaborator

Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular-cli.

If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.

There is also large thread around deploy-url in #22113.

@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2023
@jsloyer
Copy link
Author

jsloyer commented Nov 15, 2023

opened up https://stackoverflow.com/questions/77482261/angular-universal-17-alternatives-to-deployurl if others stumble across this in the future

@TheTomasJ
Copy link

TheTomasJ commented Nov 18, 2023

Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular-cli.

If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.

There is also large thread around deploy-url in #22113.

Hello, did angular team ever considered following use case?

relative links opened on new tab (via ctrl + click) should still go to '/'
assets links should point to different domain?

I still believe, removing deploy url is mistake and showstopper.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants