SASS Tips
Created 7 years ago by psaunders

Having trouble getting sass @imports to compile when you refresh your page during development? Add your assets with the live filter

{{ asset_add("theme.css", "theme::sass/main.scss", ["live"]) }}

And add this to you .env file

LIVE_ASSETS=true
ryanthompson  —  7 years ago

I'll up your tip one by adding that LIVE_ASSETS=public is a better option as it ONLY force compiles the public/standard theme where as true does both standard and admin.

failcookie  —  7 years ago

More of a common sense tip - the SASS is compiled each page load. So if your pages are loading slowly - that's why!

psaunders  —  7 years ago

Well it was refreshing the file that had the imports in it when it changed, but it wasn't detecting the changes in the imported _whatever.scss files.

ryanthompson  —  7 years ago

@psaunders I intend on fixing that too just kinda kicking around ideas for doing it without taxing the system.

The system can detect force cache busting requests (holding shift on a mac while reloading) and I think that might an OK way to trigger it as long as it's throttled.