Currently, jQuery is a dependency in intercom.js and provided through intercom.libraries.yml.

Problem:
Some sites do not use jQuery, and this module adds it, affecting performance.

Solution:
As Intercom is not dependent on jQuery to work, we should remove jQuery for those sites that would not like to include it.

Patch incoming.

CommentFileSizeAuthor
#5 remove_jquery.patch640 byteshotpizzas
#2 remove_jquery.patch621 byteshotpizzas
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hotpizzas created an issue. See original summary.

hotpizzas’s picture

FileSize
621 bytes

Here's the patch

markdorison’s picture

Assigned: hotpizzas » Unassigned
Status: Active » Needs review
markdorison’s picture

Status: Needs review » Needs work

When anonymous I am seeing the following error in the console:

ReferenceError: Drupal is not defined on line 22 of intercom.js

hotpizzas’s picture

FileSize
640 bytes

This should work. Tested anonymous in Chrome

hotpizzas’s picture

Status: Needs work » Needs review
markdorison’s picture

Status: Needs review » Reviewed & tested by the community

Works as expected in my testing.

  • jaapjan committed 48001c8 on 8.x-1.x authored by hotpizzas
    Issue #2965654 by hotpizzas, markdorison: Remove jQuery as a dependency
    
jaapjan’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, good catch! Will be in the 1.1 release later.

jaapjan’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.