You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to access files over network. With the current implementation of broccoli-asset-map, I have the following options:
Disable fingerprinting on specific files. Causes files to be cached, cache does not get busted.
Generate a random hash on build, use the same hash on all files, use the know hash to access the files. Idea by @NullVoxPopuli. Causes cache to be busted on all files, including unchanged ones.
Use an extra request to load assetMap.json over the network and find out fingerprinted URLs to files.
As you can see, all options are suboptimal.
I ended up using the first one, adding a random query param to bust the cache. This make this option tolerable.
Suggested solution
Making the asset map accessible as part of the JS bundle resolves the issue: we will be able to fetch fingerprinted assets without extra network requests, with cache busted when needed and only when needed.
Could be import { assetMap } from 'broccoli-asset-rev' or something.
Of course, this feature should be opt-in to avoid increasing bundle size for those who don't need it.
Hi! Thanks for the infrastructural addon!
Problem
I need to access files over network. With the current implementation of
broccoli-asset-map
, I have the following options:assetMap.json
over the network and find out fingerprinted URLs to files.As you can see, all options are suboptimal.
I ended up using the first one, adding a random query param to bust the cache. This make this option tolerable.
Suggested solution
Making the asset map accessible as part of the JS bundle resolves the issue: we will be able to fetch fingerprinted assets without extra network requests, with cache busted when needed and only when needed.
Could be
import { assetMap } from 'broccoli-asset-rev'
or something.Of course, this feature should be opt-in to avoid increasing bundle size for those who don't need it.
CC @simonihmig.
The text was updated successfully, but these errors were encountered: