Running into JSOptimizer exception

Created on 23 May 2025, 2 months ago

Problem/Motivation

Running into Exception: Only file JavaScript assets can be optimized. in Drupal\Core\Asset\JsOptimizer->optimize() (Zeile 31 in /var/www/html/web/core/lib/Drupal/Core/Asset/JsOptimizer.php)..

Steps to reproduce

I cannot reproduce it on a vanilla Drupal. I am still investigating, together with πŸ› Only file JavaScript assets with preprocessing enabled can be optimized. Active .
In the meantime, this seems to me like a reasonable change, since that JS file is minified.

Proposed resolution

Explicitly set minified: true to instruct core to avoid trying to optimize this file.

Remaining tasks

Provide a PR

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland stefanos.petrakis@gmail.com Biel, Switzerland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024