Make WordPress Core


Ignore:
Timestamp:
03/03/2026 01:45:29 PM (2 months 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/tests/phpunit/tests/script-modules/wpScriptModules.php

    r61587 r61794  
    19051905
    19061906    /**
     1907     * Tests that VIPS script modules always use minified file paths.
     1908     *
     1909     * Non-minified VIPS files are not shipped because they are ~10MB of
     1910     * inlined WASM with no debugging value, so the registration should
     1911     * always point to the .min.js variants.
     1912     *
     1913     * @ticket 64734
     1914     *
     1915     * @covers ::wp_default_script_modules
     1916     */
     1917    public function test_vips_script_modules_always_use_minified_paths() {
     1918        wp_default_script_modules();
     1919        wp_enqueue_script_module( '@wordpress/vips/loader' );
     1920
     1921        $actual = get_echo( array( wp_script_modules(), 'print_enqueued_script_modules' ) );
     1922
     1923        $this->assertStringContainsString( 'vips/loader.min.js', $actual );
     1924        $this->assertStringNotContainsString( 'vips/loader.js"', $actual );
     1925    }
     1926
     1927    /**
    19071928     * Normalizes markup for snapshot.
    19081929     *
Note: See TracChangeset for help on using the changeset viewer.