Upgrading AEM 6.0 JS libraries (i.e. backbone and underscore) to their up to date versions
Hi,
Recently we have decided to start using Backbone & Underscore as part of our core front-end development. However in AEM 6.0 the granite distibution that ships with the platform has two very outdated versions of these two libraries (Backbone.js 0.9.2 and Underscore.js 1.3.3). Backbone 0.9.2 is very outdated and some of its functions can lead to memory leaks. For this reason we have decided to upgrade both libraries.
Firstly we decided to create a new client library with our very own namespace, but then noticed that AEM already uses underscore internally at at runtime both instances of the same _underscore variable is running (the OOTB granite version and out own). So the question is can we simply delete the current Backbone & Underscore versions that ship with AEM 6.0 and replace it with the up to date versions (providing they are backwards compatible) or is there a better way of doing this?
Many thanks,
Filipe