WordPress.org

Make WordPress Core

Changeset 43905


Ignore:
Timestamp:
11/16/2018 12:22:27 AM (10 months ago)
Author:
pento
Message:

Build Tools: Minify the package CSS when building.

CSS coming from the @wordpress packages wasn't being minified in the build. This had the noteable side effect of causing RTL CSS to not be loaded when SCRIPT_DEBUG was set to false.

Props websupporter.
See #45330.

Location:
branches/5.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/Gruntfile.js

    r43886 r43905  
    198198                    'wp-includes/css/*.css',
    199199                    'wp-includes/js/mediaelement/wp-mediaelement.css'
     200                ]
     201            },
     202            dist: {
     203                expand: true,
     204                cwd: BUILD_DIR,
     205                dest: BUILD_DIR,
     206                ext: '.min.css',
     207                src: [
     208                    'wp-includes/css/dist/*/*.css'
    200209                ]
    201210            },
     
    940949        'webpack:prod',
    941950        'webpack:devProdTarget',
     951        'cssmin:dist',
    942952        'jsvalidate:build'
    943953    ] );
  • branches/5.0/src/wp-includes/script-loader.php

    r43903 r43905  
    16761676    $styles->add( 'wp-editor-font', $fonts_url );
    16771677
    1678     $styles->add( 'wp-block-library-theme', '/wp-includes/css/dist/block-library/theme.css' );
     1678    $styles->add( 'wp-block-library-theme', "/wp-includes/css/dist/block-library/theme$suffix.css" );
    16791679    $styles->add_data( 'wp-block-library-theme', 'rtl', 'replace' );
    16801680
    16811681    $styles->add(
    16821682        'wp-edit-blocks',
    1683         '/wp-includes/css/dist/block-library/editor.css',
     1683        "/wp-includes/css/dist/block-library/editor$suffix.css",
    16841684        array(
    16851685            'wp-components',
     
    17031703    foreach ( $package_styles as $package => $dependencies ) {
    17041704        $handle  = 'wp-' . $package;
    1705         $path     = '/wp-includes/css/dist/' . $package . '/style.css';
     1705        $path     = "/wp-includes/css/dist/$package/style$suffix.css";
    17061706
    17071707        $styles->add( $handle, $path, $dependencies );
Note: See TracChangeset for help on using the changeset viewer.