Angular-cli: ng build dropping .woff file extensions

Created on 19 Oct 2017  路  13Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

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

Versions.


@angular/cli: 1.4.8
node: 6.10.3
os: win32 x64
@angular/animations: 4.4.5
@angular/common: 4.4.5
@angular/compiler: 4.4.5
@angular/core: 4.4.5
@angular/forms: 4.4.5
@angular/http: 4.4.5
@angular/platform-browser: 4.4.5
@angular/platform-browser-dynamic: 4.4.5
@angular/router: 4.4.5
@angular/cli: 1.4.8
@angular/compiler-cli: 4.4.5
@angular/language-service: 4.4.5
typescript: 2.3.4

Windows 10

Repro steps.


Include Font-Awesome in the project. Run ng build. The dist folder contains the Font-Awesome font files with missing extensions:
image

1 (urgent) regression bufix

Most helpful comment

Was this ever fixed in 1.4.x? I am still seeing it in 1.4.10.

All 13 comments

+1 getting same issue. Seems to be happening for .woff2 and .ttf file extensions too. I also had a straggler image (outside of assets folder) and that was missing its extension (.png) too.
build-errors

Same Problem here. I just tripped over it, because the IIS will not serve files without an known extension, under nginx no problem. This problem seems to affect fonts (woff and woff2) as well as images (png).

I confirm that the 1.4.8 version breaks loading font-awesome. I just downgrade to 1.4.7 which works fine.

Same here. The issue seems to be in the 1.4.8 version. Downgrading resolves the problem.

I can only guess this is caused by https://github.com/angular/angular-cli/commit/776af86

@filipesilva you might want to check this out.

This is indeed caused by https://github.com/angular/angular-cli/commit/776af86#diff-9eb0a75e499bdadd44d6dc62218812b8R193, the .[ext] bit is missing there.

Same problem too.

Having the same problem. ng serve works as expected, but once built and uploaded to an IIS server, the files without extensions can't be served.

We should have this resolved soon, when https://github.com/angular/angular-cli/pull/8108 is merged and released.

Meanwhile, reverting to v1.4.7 (or 1.5.0-rc.0) should fix the problem.

Was this ever fixed in 1.4.x? I am still seeing it in 1.4.10.

For me it works fine on 1.4.9 but not on 1.4.10

my version of angular-cli is 7.0.3 and I also have the same problem but the ng build --prod --output-hashing none working for my or in angular.json change "outputHashing"

Was this page helpful?
0 / 5 - 0 ratings