4 ms·
> PHP has libraries for compiling SCSS and minifying JS, and filemtime() is very fast If you do compiling and minifying, that's a build step.
by todotask 3y ago
> PHP has libraries for compiling SCSS and minifying JS, and filemtime() is very fast
If you do compiling and minifying, that's a build step.
- wildrhythms 3y agoThe usage of the term 'step' here is in the pre-deployment development process sense. I think what this person is doing is converting SCSS to CSS on request, at runtime.
- todotask 3y agoRegardless of which steo, compilation process is typically done as part of a build step, where the SCSS files are transformed into the final CSS that will be served as a bundle to the end users' application. Web browsers can't understand SCSS natively. To be truly extreme (performance), devs should consider tree-shaking unused CSS and JavaScript. This may require using Vite (Rolldown is in the works/Rollup) if there are no other options or it makes no sense to serve bloated resources. That's the reason, I chose Astro as I care about users, not prioritse the developers' minimalistic workflows. I prefer Tailwind because it allows me to avoid duplicating classes (mine and vendors), which is an advantage over other approaches. I did dogfooding in Go development.
- kijin 3y agoEvery human-readable programming language must be compiled into some sort of bytecode (opcode in PHP) and/or machine language in order to work. The question is whether a human ever needs to be aware of that step. In PHP, you generally don't. In the aforementioned setup, you don't need to be aware of SCSS compilation and minification, either. Not even if you use devtools, because the map file will point to the correct line in the original source.