fuse-box / fuse-box/fuse-box-examples
Support hashing of bundles for cache breaking
- Dominant language
- No language data
- Stars
- 37
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Hi everyone,
So a very common set up is to hash bundles so that the client can cache them, but download new content whenever the bundle is updated ( and therefore will have a new hash ). However, we need to know the names of the files generated in order to serve them properly. I think I saw before that there was support for a hash() method on the "factory", but I may be mistaken.
In order to support this, I propose a hash option be added to a bundle config, with the type of hashing desired.
```
fuse.bundle("client/app")
.watch("client/**")
.hmr()
.hash("md5")
.instructions(" > client/index.ts");
```
then, we need the ability to get the names of bundles created. I was thinking as an async return from `run`, but if we're in watch-mode that may present some challenges, so I'm not sure the best way to retrieve the generated bundle names. Any input is welcome.
Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.