Skip to content

fix(@angular/cli): add a flag to let assets outside of outDir - #8123

Merged
hansl merged 3 commits into
angular:masterfrom
hansl:outdir-assets
Nov 20, 2017
Merged

fix(@angular/cli): add a flag to let assets outside of outDir#8123
hansl merged 3 commits into
angular:masterfrom
hansl:outdir-assets

Conversation

@hansl

@hansl hansl commented Oct 20, 2017

Copy link
Copy Markdown
Contributor

On top of #7778
Fixes #8122

@filipesilva filipesilva left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT of having the flag directly on the asset object definition? #8122 (comment)

@filipesilva filipesilva left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test that ensures this works?

@filipesilva filipesilva left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hansl

hansl commented Nov 16, 2017

Copy link
Copy Markdown
Contributor Author

@filipesilva PTAL.

@hansl
hansl merged commit 64c600d into angular:master Nov 20, 2017
@dzonatan

dzonatan commented Nov 23, 2017

Copy link
Copy Markdown
Contributor

So the whole project cannot be built outside anymore (using ../ in apps outDir)?
That's a breaking change. :/ At least add a note in release logs.

@BnSmth

BnSmth commented Nov 23, 2017

Copy link
Copy Markdown

@dzonatan, The change you are referring to occurred in #7778. This change adds a flag to .angular-cli.json to allow the original behavior (allowing assets to be output outside outDir).

@dzonatan

dzonatan commented Nov 23, 2017

Copy link
Copy Markdown
Contributor

@BnSmth, I'm not talking about assets. Instead about entire application. That change in #7778 only checks the asset paths against outDir. There is no limitation to use ../ in outDir.

Simple steps to reproduce:

  1. ng new example
  2. add ../ for apps[0].outDir in .angular-cli.json
  3. ng build

Do that with both cli versions and you will see in 1.5.3 it builds and in 1.5.4 doesn't.

If this was not intentional then I'll create an issue.

@guilhermejcgois

Copy link
Copy Markdown

@dzonatan I have created one #8613, this change caught us by surprise 😢

@BnSmth

BnSmth commented Nov 23, 2017

Copy link
Copy Markdown

@dzonatan Sorry, my bad. I misunderstood the issue and agree that a fix needs to be put in place. Also, as you said, given this is a breaking change, a note should have been added to the release.

@hansl
hansl deleted the outdir-assets branch November 28, 2018 23:34
@angular-automatic-lock-bot

Copy link
Copy Markdown

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.

Allow ng build to put files in the outdir and levels higher than the outdir

6 participants