내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Upgrading AEM 6.0 JS libraries (i.e. backbone and underscore) to their up to date versions

Avatar

Level 1

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

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 1

I found a temporary solution using the noconflict backbone and underscore functions, but it would be a good idea in general to find a way to upgrade JS libraries in CQ!

원본 게시물의 솔루션 보기

6 답변 개

Avatar

Level 10

I do not recommend replacing these libs.  Never overwrite  /libs or system libraries. You can easily create your own clientlibs folder and place the newer libs in the clientlibs folder. 

Then for your custom AEM component that make use of the newer functionality - reference the clientlibs folder. 

Avatar

Level 10

However, you will see conflicts with multiple versions in author instance but may work good in the publish instance. 

Avatar

Level 1

I've tried that, but it does not work due to multiple versions of the library (i.e. underscore) being loaded in Author.

Avatar

Level 10

I have asked support to look at this. 

Avatar

Level 10

Yes, as I said before, its always a problem in author environment. You can raise a support ticket for the same and see what they have to say !

Avatar

정확한 답변 작성자:
Level 1

I found a temporary solution using the noconflict backbone and underscore functions, but it would be a good idea in general to find a way to upgrade JS libraries in CQ!