Skip to content
Snippets Groups Projects

Issue #1587536: JS aggregation should account for "async" and "defer"

Open Issue #1587536: JS aggregation should account for "async" and "defer"
4 unresolved threads
4 unresolved threads

Closes #1587536

Merge request reports

Members who can merge are allowed to add commits.
Approval is optional
Code Quality is loading
Test summary results are being parsed
Metrics reports are loading
Ready to merge by members who can write to the target branch.
  • The source branch is 46 commits behind the target branch.
  • 1 commit will be added to 11.x.
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
854 854 # $settings['migrate_file_public_path'] = '';
855 855 # $settings['migrate_file_private_path'] = '';
856 856
857 /**
858 * JavaScript libraries with these attributes will be aggregated together.
859 */
860 $settings['aggregated_js_attributes'] = ['defer', 'async'];
  • 854 854 # $settings['migrate_file_public_path'] = '';
    855 855 # $settings['migrate_file_private_path'] = '';
    856 856
    857 /**
    858 * JavaScript libraries with these attributes will be aggregated together.
    859 */
    860 $settings['aggregated_js_attributes'] = ['defer', 'async'];
  • 854 854 # $settings['migrate_file_public_path'] = '';
    855 855 # $settings['migrate_file_private_path'] = '';
    856 856
    857 /**
    858 * JavaScript libraries with these attributes will be aggregated together.
    859 */
    860 $settings['aggregated_js_attributes'] = ['defer', 'async'];
  • added 1 commit

    • f610c90c - Apply 2 suggestion(s) to 2 file(s)

    Compare with previous version

  • Pierre Rudloff added 1465 commits

    added 1465 commits

    Compare with previous version

  • Pierre Rudloff added 1 commit

    added 1 commit

    • bde78f55 - clearCachedDefinitions() is deprecated

    Compare with previous version

  • catch @catch started a thread on the diff
  • 33 35 // Help ensure maximum reuse of aggregate files by only grouping
    34 36 // together items that share the same 'group' value.
    35 37 $group_keys = $item['preprocess'] ? [$item['type'], $item['group']] : FALSE;
    38
    39 // Enables aggregation for 'async' or 'defer' attributes.
    40 if ($group_keys && !empty($item['attributes'])) {
    41 foreach (array_keys($item['attributes']) as $attribute_key) {
    42 if (in_array($attribute_key, Settings::get('aggregated_js_attributes', ['async', 'defer']))) {
    43 $group_keys[] = $attribute_key;
    44 }
    45 else {
    46 $group_keys = FALSE;
  • Pierre Rudloff added 1 commit

    added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading