WordPress.org

Make WordPress Core

Changeset 44252


Ignore:
Timestamp:
12/17/2018 12:36:36 AM (11 months ago)
Author:
SergeyBiryukov
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.
Merges [43905] to trunk.
Fixes #45330.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/Gruntfile.js

    r44246 r44252  
    392392                    'wp-includes/css/*.css',
    393393                    'wp-includes/js/mediaelement/wp-mediaelement.css'
     394                ]
     395            },
     396            dist: {
     397                expand: true,
     398                cwd: BUILD_DIR,
     399                dest: BUILD_DIR,
     400                ext: '.min.css',
     401                src: [
     402                    'wp-includes/css/dist/*/*.css'
    394403                ]
    395404            },
     
    13651374        'webpack:prod',
    13661375        'webpack:devProdTarget',
     1376        'cssmin:dist',
    13671377        'jsvalidate:build'
    13681378    ] );
  • trunk/src/wp-includes/script-loader.php

    r44251 r44252  
    18531853    $styles->add( 'wp-editor-font', $fonts_url );
    18541854
    1855     $styles->add( 'wp-block-library-theme', '/wp-includes/css/dist/block-library/theme.css' );
     1855    $styles->add( 'wp-block-library-theme', "/wp-includes/css/dist/block-library/theme$suffix.css" );
    18561856    $styles->add_data( 'wp-block-library-theme', 'rtl', 'replace' );
    18571857
    18581858    $styles->add(
    18591859        'wp-edit-blocks',
    1860         '/wp-includes/css/dist/block-library/editor.css',
     1860        "/wp-includes/css/dist/block-library/editor$suffix.css",
    18611861        array(
    18621862            'wp-components',
     
    18801880    foreach ( $package_styles as $package => $dependencies ) {
    18811881        $handle = 'wp-' . $package;
    1882         $path   = '/wp-includes/css/dist/' . $package . '/style.css';
     1882        $path   = "/wp-includes/css/dist/$package/style$suffix.css";
    18831883
    18841884        $styles->add( $handle, $path, $dependencies );
Note: See TracChangeset for help on using the changeset viewer.