Thursday, April 13, 2017

how to load assets in laravel for different environments

I have this enter image description here

but I would like to eliminate uring the IF statement whenever I want to load such resources.

in the above figure for LOCAL environment I have bootstrap.min.cs and app.css files so that I can debug easily.

in PRODUCTION these two files are minified and combined in one file at core.min.css (using gulp).

is there a better way without using an IF statement but still be able to debug easily using the original files on LOCAL environment?

something like app-local.css (which includes two raw files) and app-production.css (which is one file minified and combined)?

not sure if I'm clear but I hope you get what I mean.



via Albo Best

Advertisement