Skip to content

--output-hashing doesn't work for media files of type (.png, .jpg, .gif .. etc) #4212

Closed
@un33k

Description

@un33k

Versions / Env:

angular-cli: 1.0.0-beta.26
node: 6.0.0
os: darwin x64 (macOS - El Capitan)

Repro steps.

  1. Upgrade to 1.0.0-beta.26 (as per)
  2. Verify --output-hashing is available. # ng build -h
  3. Build a production version. # ng build --prod --output-hashing=all
  4. Verify that all images are hashed

The log given by the failure.

The content of the dist/ directory is as below: Notice that the images are not hashed

dist/
├── assets
│   ├── 404.html
│   ├── css
│   │   └── loading.css
│   ├── icon
│   │   └── favicon.ico
│   ├── img
│   │   ├── logo
│   │   │   └──logo.png
│   │   └── misc
│   │   └── search.png
│   └── robots.txt
├── fontawesome-webfont.674f50d287a8c48dc19b.eot
├── fontawesome-webfont.912ec66d7572ff821749.svg
├── fontawesome-webfont.af7ae505a9eed503f8b8.woff2
├── fontawesome-webfont.b06871f281fee6b241d6.ttf
├── fontawesome-webfont.fee66e712a8a08eef580.woff
├── index.html
├── inline.67a2fb6cd14ba4fc7671.bundle.js
├── main.fdd9bda558d52de42c5f.bundle.js
├── main.fdd9bda558d52de42c5f.bundle.js.gz
├── scripts.21eca2c64fde6754ea61.bundle.js
├── scripts.21eca2c64fde6754ea61.bundle.js.gz
├── styles.0a0cdafd30d257765ef7.bundle.css
├── styles.0a0cdafd30d257765ef7.bundle.css.gz
├── styles.918490a25cf8dcdee0aa.bundle.js.gz
├── vendor.7269c21a09875bc3c8ee.bundle.js
└── vendor.7269c21a09875bc3c8ee.bundle.js.gz

More info

Please note that search.png and logo.png are NOT hashed. Also verified that hash is NOT passed into the image url as a param. (e.g. /url/image.png?hash)

Desired behavior

  1. Option to pass or configure extensions of file types where hashing is desired
  2. Option to include hash in file name
  3. Option to cache bust via url param (?hash)

Note

In this example the --output-hashing=all has been passed in explicitly even though docs indicate that all is a default value for --prod. All combinations & permutations of with/without --output-hashing was attempted without a +ve result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions