How do i mark the assets js file inside the wingsuits dist directory as a minified drupal library?

Created on 7 March 2024, 10 months ago
Updated 22 March 2024, 9 months ago

Problem/Motivation

I've found that, when js aggregation is enabled on a site (D10) pages are very slow to load. I've described the issue to a greater extent on the related issue and on this comment here: https://www.drupal.org/project/drupal/issues/3392103#comment-15287101 🐛 Performance problem with the on-the-fly minification and xdebug Active From that thread someone pointed out that i might have some files which are not marked as minified and this could be causing the issue (drupal essentially tries to reminify already minified files). This was correct, the pattern.behavior.js files i had hadn't been marked as minified, after updating these the loading speed on pages has improved but it's still not great.

This has led me to believe that other files in the dist directory are likely causing the last bit of slowness. From looking at the file sizes the assets.js file is the largest at 260kb. Unfortunately from looking around i can't actually see if this file has a library definition anywhere and if it's been marked as minified.

Does anyone know how or where i can go about making this change?

Many thanks :-)

💬 Support request
Status

Fixed

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom lincoln-batsirayi

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

Comments & Activities

  • Issue created by @lincoln-batsirayi
  • Status changed to Fixed 10 months ago
  • 🇬🇧United Kingdom lincoln-batsirayi

    I was able to figure out the issue here. The final fix was ensuring that the alpine.js and breakpoint-helpers.js files being added to wingsuit/dist/vendors, who's library definitions we had in our theme were also marked as minified. This completely resolved the slow loading issues with js aggregation turn on.

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

Production build 0.71.5 2024