DEV Community

Cover image for Magento 2 Compiling on server or client side? (Pros and Cons)

Magento 2 Compiling on server or client side? (Pros and Cons)

rafaelcg profile image Rafael Corrêa Gomes ・1 min read

What's the better way, Server or Client side? I had this question for many time, and I after learn I forgot all points when the other developers have asked me about. So I decided to list all on this simple list below, and adding the Local Compilation too.
A disclaimer, I ever use server-side compilation on admin panel and local compilation on my local environment. ;)

You can find this configuration on Store > Configuration > Advanced > Developer > Frontend Development Workflow.

Server-Side compilation

The server-side compilation is the default choice, used for first-time compilation after setup and for production mode.


  • Slow
  • Global recompile
  • Need to delete static files before each run


  • No additional setup required
  • Works on server side

Client-Side compilation

Client-side compilation with Javascript is optional and is used to quickly preview changes and to debug small issues.


  • Annoying blinking before styles compile
  • Global recompile


  • No need for additional setup, can be switched in Admin area
  • Fast

Local compilation

Local compilation with Node.js and Grunt task runner is an advanced mode recommended for deep customization.


  • Requires initial setup of local environment


  • Fast
  • Recompiles only local changes
  • Easy to debug
  • Can be automated with watching and live reload

I hope that this explanation helps you in your projects, I would like to know which you prefer, and why? Tell me on comments.

Discussion (0)

Editor guide