sprockets icon indicating copy to clipboard operation
sprockets copied to clipboard

Sprockets 3.7.x pipeline metadata interferes with loading certain files

Open rafalyesware opened this issue 6 years ago • 1 comments

Expected behavior

Sprockets 3.7.x should be able to process source asset files such as "header.default.html", emitting a simple HTML file into the bundle with the original name, since it does not require any transformation.

Actual behavior

For any file that ends in ".default.", Sprockets interprets the "default" as the pipeline name, strips it from the final output filename and emits the file as "<filename with ".default" removed>.<known-media-extension>" instead. E.g. in the case of "header.default.html", the output asset is emitted as "header.hml" (or with a fingerprint as "header-<asset-digest>.html").

ISTM that parsing / encoding metadata for an internal abstraction from/into the source asset filenames is inherently broken. But even beyond the fact whether it's right or wrong, it should be mentioned in the documentation, since it impacts the filenames that can be used for assets successfully.

System configuration

Sprockets 3.7.2 / Ruby 2.4.2

Example App

See https://github.com/rafalyesware/miniature-palm-tree

rafalyesware avatar Jun 10 '19 20:06 rafalyesware

Any work done on this!?

This exists also on v4.0.0 beta10 I am unable to use Blazer due to this issue!

Thanks!

nemani avatar Sep 16 '19 22:09 nemani