Open michaelglass opened 5 years ago
I have the same issue. #= require some_jst_eco_filename
in a *.coffee file fails since sprockets 4.0.0.
I guess, this is because sprockets prior to 4.0 treats coffeescript file as application/javascript
, but sprockets 4.0 doesn't. More in detail, Sprockets::Transformers#expand_transform_accepts#expand_transform_accepts
returns only text/coffeescript
and text/coffeescript+ruby
types, but doesn't application/javascript
or other javacript-like types for text/coffeescript
, so sprockets 4.0 can't link a coffeescript file with a regular javascript file.
I reproduced the issue with a tiny project. https://github.com/a2ikm/sprockets-test2
Here is a failed test case for 4.0. https://travis-ci.org/github/a2ikm/sprockets-test2
Expected behavior
Sprockets finds a file
Actual behavior
The file missing is in one of the
Checked in these paths
directory, but it's a regular javascript file. The source file / file being compiled is a coffeescript file.Could this be similar to https://github.com/rails/sprockets/issues/273?
System configuration
Will try to get an example app built. It appears this behavior is flakey :-/