Remove jQuery dependency from search-wide.js

Created on 20 January 2025, about 1 month ago

Problem/Motivation

Enabling the search recipe adds nearly 280kb of JavaScript to the page relative to the base recipe.

Part of this is due to 📌 Try to load autocomplete and other js when the search button is clicked Active . However, uninstalling search_api_autocomplete only removes about 60kb of JavaScript, leaving about 180kb on the page.

This appears to be at least partly because because search-wide.js itself depends on jQuery, and is shown for anonymous users. I couldn't yet find another library on that page that could cause jQuery to be pulled in. Will try to update here if it turns out to be something else too.

Steps to reproduce

Install Drupal CMS, check JavaScript weight on the front page as an anonymous user, install the search recipe and compare, uninstall search_api_autocomplete and compare again.

Proposed resolution

User interface changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Component

Olivero

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024