-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add build.getPublicHash
option
#1377
Conversation
Generate a revision hash for each asset in the public directory.
I don't know about this. Assets referenced from imports are already auto-hashed. So this means anything under The whole point of |
b03bac6
to
9866e02
Compare
I've been using The alternatives are:
|
- ensure JS bundle references to public/ assets are rewritten - add `publicUrls` property to ResolvedConfig - copy public assets before HTML transforms are applied
@knightly-bot build this |
I would prefer this to be a 3rd party plugin to not break the originally intended usage of |
I tried that approach first, but it's not currently possible. If we had a hook for rewriting public filenames (eg: I still think having it built-in is better, since it lets us avoid |
Removed the |
Generate a revision hash for each asset in the public directory.
Features
public/
assets. Cache forever, effortless "invalidation".checkPublicFile
calls when building, thereby reducing FS calls.