Caching: output hashed assets to dedicated folders #3156
Labels
difficulty: intermediate
Issues that are medium difficulty level, e.g. moderate refactoring with a clear test plan.
feature
This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
good first issue
If you are just getting started with Docusaurus, this issue should be a good place to begin.
mlh
Major League Hacking Fellowship
🚀 Feature
Currently, the build output looks like:
Having this flat structure with all file types (hashed or not) melted at the root makes the caching story more complex.
Hashed assets are safe to cache very aggressively, and we should rather move them to a subfolder so that it's easy to enable caching.
For example, aggressive caching can be set by dropping a
./build/_headers
config file:It is possible to output the webpack JS files in subfolders:
It should also be possible to achieve with other assets (css, images...).
The files of the
/static
folder will not be processed by webpack, and not be hashed so they can stay at the root without aggressive caching.The text was updated successfully, but these errors were encountered: