krop icon indicating copy to clipboard operation
krop copied to clipboard

Asset serving

Open noelwelsh opened this issue 2 months ago • 0 comments

In development mode we don't want the web browser to cache assets, such as JS or CSS, that are under development. This PR implements this feature, which consists of a type of Route for managing assets. It:

  • sets up a directory watcher for a given directory, calculating hashes for each file in the directory and recalculating the hash on change.
  • implements pathTo by replaces file names with the file name + hash
  • serves files by removing the hash and serving the underlying file

noelwelsh avatar Oct 23 '25 15:10 noelwelsh