Add js.txt below clientlibs. Update js.txt with the path to the javascript file.

Add ‘cq.authoring.editor’ category to component’s clientlibs

Step 4: Update the component with the desired behavior

The component is both available for use & responsive. You can update the component script as per the business requirement. Also, delete the scripts that are not being overwritten. The deleted scripts would be inherited via Sling resource merger