NfNitLoop / deno-embedder

Dev tools for embedding static files into Deno as code.
37 stars 4 forks source link

Feature: Add ETag support #1

Open NfNitLoop opened 1 year ago

NfNitLoop commented 1 year ago

This is a feature I requested and used in rust-embed: https://github.com/pyrossh/rust-embed/issues/140

Would be nice to have it here too.

NfNitLoop commented 1 year ago

Not sure how I should handle LastModified for the ESBuilder plugin. I guess we could always just emit the current date, but might result in lots of spurious updates to that line in the file.

OTOH, I suppose if we cared about clean Git history we wouldn't be constantly checking in bundles of our code. 🤪

pomdtr commented 2 months ago

I would love to get support for this.

I'm exploring using jsr has a way to publish websites / apps: https://dash.deno.com/playground/val-town-docs

image

You can even run these websites locally:

deno serve jsr:@pomdtr/val-town-docs@0.0.5

Currently I use some very basic cache-control:

https://jsr.io/@pomdtr/val-town-docs/0.0.4/mod.ts#L24

But i would prefer to use Last-Modified headers.