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
For cache invalidations, a common pattern is to add query strings - ?q=asdfhjkl with a random timestamp or hash.
When using the generator, we could enable an option to include "querystrings" in the map, something like the following:
newGenerator({querystring: 'q=asdfjkll'});awaitgenerator.install('pkg');// includes "pkg": "/path/to/pkg?q=asdfjkl"// ALSO includes "/path/to/pkg/dep.js": "path/to/pkg/dep.js?q=asdfjkl" for non-mapped deps!console.log(generator.getMap());
The text was updated successfully, but these errors were encountered:
Ideally one would want to scope the querystring stuff to specific domains / parents though. Eg you likely don't want it for the JSPM CDN, just the local package code... not sure how best to define that part.
new Generator({
queryStrings: {
'/': 'timestamp=asdf',
'https://esm.sh/': 'dev'
}
});
Then when processing URLs we would always strip all querystrings, but then add them back at the very end of the import map construction process as a post-processing of the import map, possibly even after the import map has been serialized into JSON. like a const map = importMap.getMap(); const mapWithQueryStrings = postProcess(map) step.
For cache invalidations, a common pattern is to add query strings -
?q=asdfhjkl
with a random timestamp or hash.When using the generator, we could enable an option to include "querystrings" in the map, something like the following:
The text was updated successfully, but these errors were encountered: