eleventy-plugin-bundle icon indicating copy to clipboard operation
eleventy-plugin-bundle copied to clipboard

Add bucket name as prefix of the bundle filename

Open nhoizey opened this issue 1 year ago • 1 comments

A project in which I use this plugin currently generates two JavaScript bundles, for two buckets:

  • C5F5JJJEjF.js
  • NfTCyKwx5R.js

I would like to include only one of them in my Service Worker precaching, but the filename doesn't really help configuring the Service Worker build with a glob (I'm using Workbox).

It would be great if the bundle filename could include the bucket name as bucket-name_hash.js, which in my current use case would be:

  • decap-cms_C5F5JJJEjF.js
  • not-critical_NfTCyKwx5R.js

nhoizey avatar Mar 26 '24 17:03 nhoizey

I'd also like something similar to this feature. The ability to just name your bundles so that they can be a consistent url. For example I might want to split my css for convenience-sake (locality of behaviour) but eagerly load a css bundle on the root or other template, but I can't do that if the bundle name always changes.

cssandstuff avatar Jul 22 '24 23:07 cssandstuff