Merging JavaScript Files
Multiple JavaScript files can be merged into a single, condensed file to reduce page load time. If you open a merged JavaScript file, you will find one continuous stream of text, with line breaks removed. If you are finished with the development process and the code contains no errors, you might consider merging the files.
JavaScript files can be merged from the Admin panel only when working in Developer Mode.
Merge your JavaScript files
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand Advanced and choose Developer.
-
Expand
the JavaScript Settings section.
-
Set Merge JavaScript Files to
Yes
. -
When complete, click Save Config.