5 ms·
Great news, and a hearty congrats and thank you to all the contributors! As a frontend designer, I'd been hoping for some mention of faster SASS/SCSS compiling
by reneherse 7y ago
Great news, and a hearty congrats and thank you to all the contributors!
As a frontend designer, I'd been hoping for some mention of faster SASS/SCSS compiling, but it looks like it's the same asset pipeline for that. Can anyone recommend a current resource for decreasing compile times?
I love designing in a Rails app, but my non-Rails projects all seem to inject CSS changes into the browser almost instantaneously, whereas with Rails there's often a wait of up to 10 seconds. The lag is pretty disruptive to the design workflow. I'm pretty new to Rails so any tips on what I might be doing wrong would be appreciated :)
- sansnomme 7y agoUse Webpack for SCSS (and if necessary enable PostCSS, though I am pretty sure Rails' Webpack config supports SCSS by default) and enable livereload, the problem will fix itself.
- reneherse 7y agoAwesome, thanks for the tip.
- tomphoolery 7y agosassc-rails is helpful since it binds to libsass.
- peteforde 7y agoDefinitely switch over to sassc-rails, which should give you a massive speed boost. I also run an instance of bin/webpack-dev-server which handles all of my dev-time Sass pushing needs. One thing I'm a little sad about is the decision to continue using sprockets (aka Asset Pipeline) for CSS and images. My understanding is that a lot of gems would break if they changed but I can't help feel an opportunity was lost to bite the bullet and do the big switch all at once. I guarantee you that it's coming. Luckily, I can say that switching to using Webpack for CSS is very doable. The best instructions are here: https://gist.github.com/andyyou/834e82f5723fec9d2dc021fb7b819517 https://gist.github.com/andyyou/834e82f5723fec9d2dc021fb7b81...