Overview
As part of our ongoing performance improvements, we recently optimized the Unlayer library to reduce its overall bundle size and improve loading performance.
As a result of this optimization, Lodash is no longer included by default in the Unlayer library.
Most customers will not be affected by this change. However, if your Custom Tool depends on Lodash, you'll need to load the Lodash library separately.
Who Is Affected?
This change only affects customers who have developed Custom Tools that rely on the Lodash library.
If your Custom Tool does not use Lodash, no action is required.
Symptoms
If your Custom Tool depends on Lodash and the library is not loaded, you may notice issues such as:
The Custom Tool fails to load.
The Custom Tool is not displayed in the editor.
JavaScript errors related to missing Lodash functions.
The Custom Tool behaves unexpectedly after upgrading to a newer version of the Unlayer editor.
Why Was This Change Made?
Removing Lodash from the default Unlayer bundle helps:
Improve editor loading performance.
Reduce the overall JavaScript bundle size.
Eliminate unnecessary dependencies for customers who do not use Lodash.
Improve long-term maintainability of the editor.
How to Resolve the Issue
If your Custom Tool depends on Lodash, simply load the Lodash library as part of your customJS configuration.
The first entry in the customJS array should be the Lodash library, followed by your Custom Tool script(s).
Detailed implementation instructions and examples are available on our examples page.
