Make WordPress Core


Ignore:
Timestamp:
06/29/2021 03:08:16 PM (4 years ago)
Author:
youknowriad
Message:

Build: Split packages and blocks to their webpack configs.

This also adds support for the viewScript for blocks fixing
the PDF preview for file blocks.

Props desrosj, gziolo.
See #53397.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/register.php

    r50927 r51259  
    134134        );
    135135        $this->assertSame(
     136            'unit-tests-my-block-view-script',
     137            generate_block_asset_handle( $block_name, 'viewScript' )
     138        );
     139        $this->assertSame(
    136140            'unit-tests-my-block-editor-style',
    137141            generate_block_asset_handle( $block_name, 'editorStyle' )
     
    156160            'wp-block-paragraph',
    157161            generate_block_asset_handle( $block_name, 'script' )
     162        );
     163        $this->assertSame(
     164            'wp-block-paragraph-view',
     165            generate_block_asset_handle( $block_name, 'viewScript' )
    158166        );
    159167        $this->assertSame(
     
    373381        $this->assertSame( 'tests-notice-editor-script', $result->editor_script );
    374382        $this->assertSame( 'tests-notice-script', $result->script );
     383        $this->assertSame( 'tests-notice-view-script', $result->view_script );
    375384        $this->assertSame( 'tests-notice-editor-style', $result->editor_style );
    376385        $this->assertSame( 'tests-notice-style', $result->style );
Note: See TracChangeset for help on using the changeset viewer.