Skip to content
Snippets Groups Projects

Wrap resulting JS file in IIFE on build

Merged Goldland Media requested to merge feature/wrap-build-in-iife into main

We decided to wrap the resulting JS file in IIFE because from a certain commit (!26 (merged)) search-ui started breaking the content-ui application.

It's happening for logged in users, on pages with the search-ui integration (mainly homepage and /suche). The reason is that content-ui's JS scripts and search-ui's JS scripts contain the same global variable _. In content-ui it's used by Drupal's core modules, that are only enabled for logged in users - this is why there's no error for anonymous users. Currently we can't disable/deactivate this script and module from the content-ui side.

Wrapping the search-ui JS code in IIFE solves this problem.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.