ember-cli / broccoli-asset-rev

Broccoli plugin to add fingerprint checksums and CDN URLs to your assets
MIT License
87 stars 84 forks source link

Multiple fingerprinted assetMap.json files with v2.6.0 #122

Open bschouwerwou opened 6 years ago

bschouwerwou commented 6 years ago

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.

mydea commented 6 years ago

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

josex2r commented 4 years ago

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

amk221 commented 4 years ago

I need this too. Any update?

joankaradimov commented 4 years ago

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

adrigzr commented 2 years ago

Any news? We need this so much 😄