From 975de7d2bbb4d30d39c56ce4fd8ebd0a35f74b68 Mon Sep 17 00:00:00 2001 From: Matt Brictson Date: Tue, 8 Oct 2019 13:08:27 -0700 Subject: [PATCH] Update manifest.js for sprockets 4.0 compatibility 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: https://github.com/rails/sprockets/issues/597#issuecomment-489968827 --- app/assets/config/manifest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 59181933..1f88c80a 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,2 +1,2 @@ //= link_tree ../images -//= link_directory ../stylesheets .css +//= link application.css