broccoli-asset-rev icon indicating copy to clipboard operation
broccoli-asset-rev copied to clipboard

Multiple fingerprinted assetMap.json files with v2.6.0

Open bschouwerwou opened this issue 8 years ago • 5 comments

  • ember-cli 2.11.1
  • broccoli-asset-rev 2.6.0

I'm getting multiple assetMap.json files with v2.6.0 when I have fingerprintAssetMap: true. One file is correct, while the other is empty. Also of note is that the empty asset map file is included in the other.

assetMap-cd33192964e8c20af9391de38dbf449b.json:

{
  "assets": {
  },
  "prepend": "/"
}

assetMap-103a2cd1042363eeb87594e00d9ab623.json:

{
  "assets": {
    "assets/app.css": "assets/app-d41d8cd98f00b204e9800998ecf8427e.css",
    "assets/app.js": "assets/app-471ff2328e75d6c15e58dd5d046f5e9c.js",
    "assets/assetMap.json": "assets/assetMap-cd33192964e8c20af9391de38dbf449b.json",
    ...
  },
  "prepend": "/"
}

Having two files results in some production builds breaking because the empty asset map might be included. I didn't look into how it determines which file to load, but my guess is it's pulling in the first asset map it finds alphabetically, so it depends on the hashes being generated for each file and explains why its differs build to build.

Downgrading to 2.5.0 generates one file as expected.

bschouwerwou avatar Sep 11 '17 21:09 bschouwerwou

Any update on this? I am also experiencing this issue.

mydea avatar Feb 14 '18 10:02 mydea

Is #130 going to be merged? That branch fixed the same problem in my projects.

josex2r avatar Feb 20 '20 09:02 josex2r

I need this too. Any update?

amk221 avatar Apr 24 '20 09:04 amk221

Sadly there's been no activity in this repo for 2 years

joankaradimov avatar Apr 24 '20 11:04 joankaradimov

Any news? We need this so much 😄

adrigzr avatar Jul 14 '21 09:07 adrigzr