Frage

Jammit does not append a query string to files in production environments after compiling all the assets.

This presents caching problems for me since my web server uses query strings to bust the cache.

How can I use jammit (or another tool) to properly uglify, concatenate, and append a query string?

War es hilfreich?

Lösung

Adding a response in case anyone else runs into this.

Jammit rewrites relative urls when concatenating css files. This is necessary because relative paths in css are relative to the file containing the path, so when css files are concatenated, these paths need to be rewritten. During this rewriting process Jammit seems to remove query params. To my understanding, to work around this you'll need to either 1) use absolute urls in your css files 2) patch Jammit.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top