Edit Theme JavaScript

Advanced

circle-exclamation
circle-info

If you want to modify only a few components and retain code splitting, consider using Eclipse's standalone file for custom JavaScript events.

Eclipse includes a single, editable JavaScript file (assets/theme.js) for custom development that can be enabled in the snippets/theme-globals.liquid file.

Switching to the unminified theme.js disables code splitting, which bundles the theme JavaScript into multiple files used for lazy-loading and improved site performance. We do not recommend editing these files directly.

Switch to theme.js


The theme.js file, when enabled, lets you edit a single JavaScript file, instead of many files, and includes comments from our developers to help you along.

circle-info

We highly recommend backing up your theme and documenting any additions for troubleshooting and theme updates, which require manually transferring the code.

chevron-rightSTEPShashtag

Open the theme-globals.liquid file in the Snippets folder.

  1. Find the useUnminThemeJS variable and set it to true

  assign useUnminThemeJS = false

2. You can now begin editing the theme.js file in the Assets folder.

Last updated