Skip to content

Commit

Permalink
Update manifest.js for sprockets 4.0 compatibility
Browse files Browse the repository at this point in the history
In sprockets 4.0.0, the `link_directory ../stylesheets .css` directive
causes sprockets to process all `.scss` files in an arbitrary order,
regardless of any `@import` statements. This leads to undefined variable
errors when e.g. the file using a variable is processed before the file
that defines it.

Fix by explicitly rooting the sprockets manifest at `application.css`,
as suggested here:

rails/sprockets#597 (comment)
  • Loading branch information
mattbrictson authored and christiannelson committed Oct 8, 2019
1 parent 445ca00 commit 975de7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link application.css

0 comments on commit 975de7d

Please sign in to comment.