Disabling Javascript Merging in Magento

If you have ever written Javascript for Magento, you have probably been frustrated by the fact that Magento merges all of its JS files before outputting them to the front end. This makes debugging difficult for a few of reasons:

  • It makes it more difficult to see if your JS file is even being loaded
  • When Firebug (or your JS debugger of choice) logs errors to the console, it’s impossible to match up the line numbers Firebug reports with the line numbers in the file
  • If you want to use Firebug’s debugging or profiling tools, you’re greatly impaired by having all the JS in one file.

A few months ago, one of our developers stumbled across the ability to disable the JS merging in Magento: Go to System > Preferences > Developer > Javascript Settings tab > Set “Merge JavaScript Files” to “No”.

I hope this helps in your Magento Javascript debugging!

Share it


Related Posts

Everything You Need to Know About Updating to Google Analytics 4

Classy Llama is Proud to be a Sponsor of Signifyd’s #FLOWSummit2023

Classy Llama Earns 2 New Workplace Awards from Comparably.com

Contact Us