psaunders - 1 year ago

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


ryanthompson - 1 year 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 - 1 year 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 - 1 year 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 - 1 year 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.