Angular-cli: Angular CLI production build placing duplicates of all my fonts in the root of my dist directory. Can this be avoided?

Created on 15 Jun 2017  路  13Comments  路  Source: angular/angular-cli

Do you have any solutions?

Most helpful comment

Bug Report or Feature Request (mark with an x)

  • [ ] bug report -> please search issues before submitting
  • [x] feature request

Versions.

ng version : 1.2.0
NPM: 5.3.0
Node: 6.11.0
Windows 10

Repro steps.

Simple steps to reproduce this bug.
ng build --prod --aot=false -bh=./ -d=./resources
-d is for specifying the publicPath. It changes the url() in css files but actual files are not in resources directory.

The log given by the failure.


NA

Desired functionality.

What would like to see implemented?

Separate folder or use assets folder for fonts and images referenced in css/less/sass files.

What is the usecase?

We are using font-awesome, kendo like other 3rd Party libraries in our project. Using Angular CLI we are creating production build.

Angular CLI emitting all referenced resources like jpg|png|webp|gif|otf|ttf|woff|woff2|cur|ani into root folder of the distribution.

Can these files placed in assets or configurable folder names?

Mention any other details that might be useful.


image

All 13 comments

Please either update this issue or create a new issue following the new issue template. Thank you!

I also suggest checking out this article in the documentation: https://github.com/angular/angular-cli/wiki/stories-asset-configuration

Bug Report or Feature Request (mark with an x)

  • [ ] bug report -> please search issues before submitting
  • [x] feature request

Versions.

ng version : 1.2.0
NPM: 5.3.0
Node: 6.11.0
Windows 10

Repro steps.

Simple steps to reproduce this bug.
ng build --prod --aot=false -bh=./ -d=./resources
-d is for specifying the publicPath. It changes the url() in css files but actual files are not in resources directory.

The log given by the failure.


NA

Desired functionality.

What would like to see implemented?

Separate folder or use assets folder for fonts and images referenced in css/less/sass files.

What is the usecase?

We are using font-awesome, kendo like other 3rd Party libraries in our project. Using Angular CLI we are creating production build.

Angular CLI emitting all referenced resources like jpg|png|webp|gif|otf|ttf|woff|woff2|cur|ani into root folder of the distribution.

Can these files placed in assets or configurable folder names?

Mention any other details that might be useful.


image

this issue should be reopened.

any solution? The same thing happens to me with images as well as with the sources

facing this same issue

The same issue

I am also experiencing this issue. CLI version is 1.7.0

I think this is a duplicated of #6599

@vimalraj-a have you found a solution or a workaround to your problem?

This issue should be reopened, and https://github.com/angular/angular-cli/issues/6599 too

I have the same problem with fonts and images.
Captura de pantalla (21)

That's actually not a problem as that is the intended behavior. If preferred, the resourcesOutputPath build option can be used to place the resources in a directory.

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._

Was this page helpful?
0 / 5 - 0 ratings