Problem/Motivation

In youtube_cookies.libraries.yml, the onetrust and eu_cookie_compliance libraries declare their JS files with { minified: true }, but the actual JS files (js/onetrust.js and
js/eu_cookie_compliance.js) are not minified. They contain full comments, whitespace, readable variable names, and JSDoc blocks.

When minified: true is set, Drupal's asset pipeline skips its own minification/aggregation optimizations for those files, assuming they are already minified. This results in unoptimized JS being served to end users.

Steps to reproduce

  1. Open youtube_cookies.libraries.yml.
  2. Note that onetrust library declares js/onetrust.js: { minified: true }.
  3. Note that eu_cookie_compliance library declares js/eu_cookie_compliance.js: { minified: true }.
  4. Open the actual JS files and confirm they are not minified (contain comments, whitespace, JSDoc, etc.).

Proposed resolution

Remove the minified: true flag from both the onetrust and eu_cookie_compliance library definitions, or replace it with minified: false, so that Drupal can properly process these files during aggregation.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

eduardo morales alberti’s picture

Assigned: eduardo morales alberti » Unassigned
Status: Active » Needs review

Ready to review

frouco’s picture

Status: Needs review » Reviewed & tested by the community

frouco’s picture

Status: Reviewed & tested by the community » Fixed

Fixed on release 2.0.7

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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