angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng build dropping .woff file extensions

Open ghost opened this issue 9 years ago • 14 comments

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

ghost avatar Oct 18 '17 23:10 ghost

+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

nicholasblexrud avatar Oct 19 '17 01:10 nicholasblexrud

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

pwfraley avatar Oct 19 '17 08:10 pwfraley

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

dinerotah avatar Oct 19 '17 10:10 dinerotah

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

martino01 avatar Oct 19 '17 10:10 martino01

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

@filipesilva you might want to check this out.

smoke avatar Oct 19 '17 11:10 smoke

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

filipesilva avatar Oct 19 '17 11:10 filipesilva

Same problem too.

karloscode avatar Oct 19 '17 11:10 karloscode

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.

Bidthedog avatar Oct 19 '17 17:10 Bidthedog

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

filipesilva avatar Oct 19 '17 18:10 filipesilva

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

filipesilva avatar Oct 19 '17 18:10 filipesilva

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

eppsilon avatar Jan 25 '18 21:01 eppsilon

For me it works fine on 1.4.9 but not on 1.4.10

rmeshksar avatar May 07 '18 16:05 rmeshksar

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"

MedinaGitHub avatar Mar 15 '19 17:03 MedinaGitHub

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.