How can I enable Source Maps for Sass in rails 4?

后端 未结 2 1296
迷失自我
迷失自我 2020-12-17 10:58

According to this issue https://github.com/rails/sass-rails/pull/192
sass-rails hasn\'t support for Sass 3.3 yet.

But it seems that sass-rails-sou

2条回答
  •  情书的邮戳
    2020-12-17 11:03

    There is a great new drop in replacement for sass-rails, which is not only faster, but also has the option to use inline source-maps.

    Just add it to your Gemfile

    #gem 'sass-rails', '~> 5.0'
    gem 'sassc-rails'
    

    and add the configuration

    # config/environments/development.rb
    config.sass.inline_source_maps = true
    

    Don't forget to restart your server, then you should see it working in the inspector:

    You can find the repo here: https://github.com/sass/sassc-rails

提交回复
热议问题