Make WordPress Core


Ignore:
Timestamp:
03/03/2026 01:45:29 PM (5 weeks ago)
Author:
adamsilverstein
Message:

General: VIPS library omit un-minimized and .map files.

Omit these files which offer little value since the VIPS library is primarily inlined WASM. Saves ~30MB total from the build output.

Props swissspidy, westonruter, adamsilverstein, berislav.grgicak, knutsp.
Fixes: #64734.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-modules.php

    r61611 r61794  
    191191        }
    192192
     193        // VIPS files are always minified — the non-minified versions are not
     194        // shipped because they are ~10MB of inlined WASM with no debugging value.
     195        if ( str_starts_with( $file_name, 'vips/' ) && ! str_contains( $file_name, '.min.' ) ) {
     196            $file_name = str_replace( '.js', '.min.js', $file_name );
     197        }
     198
    193199        $path        = includes_url( "js/dist/script-modules/{$file_name}" );
    194200        $module_deps = $script_module_data['module_dependencies'] ?? array();
Note: See TracChangeset for help on using the changeset viewer.