Skip to content

refactor(@angular/cli): remove deploy URL option and CSS special cases #9910

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

Closed
wants to merge 1 commit into from

Conversation

clydin
Copy link
Member

@clydin clydin commented Mar 8, 2018

Superseded by angular/devkit#505

For reference, a comparison of the deploy URL and base HREF options can be found here: https://github.com/angular/angular-cli/blob/master/docs/design/deployurl-basehref.md

BREAKING CHANGE:

The deploy URL option has been removed. The base HREF option alone covers a majority of the use cases of the deploy URL option with the added benefit of affecting relative URL assets referenced in component HTML templates. For more advanced use cases, the Angular APP_BASE_HREF token can be used in conjuction to adjust the Angular routing root path.
Also, root-relative CSS resources will no longer be modified when a base HREF is present. For cases where a relative URL referenced resource should not be processed by the CLI, a caret ^ may be prefixed to the URL of the CSS resources to prevent the CLI from processing or otherwise modifying the URL and resource.

BREAKING CHANGE:

The deploy URL option has been removed.  The base HREF option alone covers a majority of the use cases of the deploy URL option with the added benefit of affecting relative URL assets referenced in component HTML templates.  For more advanced use cases, the Angular `APP_BASE_HREF` token can be used in conjuction to adjust the Angular routing root path.
Also, root-relative CSS resources will no longer be modified when a base HREF is present.  For cases where a relative URL referenced resource should not be processed by the CLI, a caret `^` may be prefixed to the URL of the CSS resources to prevent the CLI from processing or otherwise modifying the URL and resource.
@clydin clydin force-pushed the remove-deploy-url branch from 3f5fbc1 to 744971f Compare March 9, 2018 00:49
@filipesilva
Copy link
Contributor

I think these changes need to be added to the DevKit repo instead, we're in the middle of removing the webpack configs from this one.

@changhuixu
Copy link

@clydin Excellent. This is an exciting change.
Currently, webpack public path uses --deploy-url to load lazy loading feature modules. What will be the "public path" in future? base HREF or APP_BASE_HREF? Or do we need to worry about it at all? Thank you.

@clydin
Copy link
Member Author

clydin commented Mar 26, 2018

@changhuixu The HTML base HREF applies to all relative URL requests within the application. This includes lazy loaded modules. Webpack internally injects a <script/> element into the DOM with src attribute referencing the bundle to load as a relative URL.

@changhuixu
Copy link

Great. Thank you.

@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 Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants