Skip to content

v1.23.0 -- JST support on Sprockets 4

Compare
Choose a tag to compare
@mathieujobin mathieujobin released this 16 May 22:56
· 2 commits to master since this release

Sprockets 4 changes the way paths with multiple extensions are resolved, and that causes imports of .jst.hamlc files to end in file-not-found precompilation errors. And even if you get past that, the JstProcessor would not be included in its processor chain, unless the file type that comes out of HamlTransformer is application/javascript+function.
The solution is to follow the JST registration pattern that S4 uses internally for text/eco, text/ejs, which it supports out of the box.