Toggle JavaScript minification in preview

By default, widget and element JavaScript files are minified when you view a storefront in preview mode.

To aid in debugging your custom widgets, you can turn minification off, allowing you to see the complete widget and element JavaScript source code in your browser’s debugging tools.

To toggle JavaScript minification, do the following:

  1. Click the Preview button to preview your storefront and its unpublished changes in Preview mode.
  2. Click the Debug Tools menu.
  3. Use the Minify JavaScript option to enable or disable minification.
  4. Refresh the page or navigate to a new page to force a full page refresh.
Note: The Minify JavaScript option only affects the widget and element JavaScript files. Other JavaScript libraries will continue to be minified.