문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top