Closed hoenth closed 5 years ago
Add the path in Sass
class
config/initializers/sass_settings.rb
# frozen_string_literal: true
Sass.load_paths << Rails.root.join('app', 'assets', 'stylesheets').to_s
@WaKeMaTTa That did the trick. Thank you!. I also had to add:
Sass.load_paths << Rails.root.join('vendor', 'assets', 'stylesheets').to_s
Thanks WaKeMaTTa to help!
I guess rails-specific sass integration is missing in Hamlit, and I would like to eliminate the necessity to modify Sass.load_paths
as long as it's Haml's feature. But actually rendering the following template
:scss
@import test
failed with haml.gem in my rails new
-ed app with app/assets/stylesheets/test.scss
. I don't know how it could be working now. Is it possible to give me a small repository that reproduces the issue? (You can ignore my comment if you're happy with modifying Sass.load_paths
)
We have a bit of scss embedded on a page with an @import statement
Unfortunately, it can't locate the file: File to import not found or unreadable: bootstrap4/variables.
This works with haml (we are trying to switch to hamlit).
Do the files need to be further prepended with path information for hamlit to find them? The file above is in the app/assets/stylesheets/bootstrap4 folder