Support

Account

Home Forums Front-end Issues Style loading even if block not used. Reply To: Style loading even if block not used.

  • Above solution works for me too. Thanks.

    Just make sure to use wp_register_style for all styles.

    Do not add the style names to register_block_type, instead put style in the block.json.

    ps: I had to opt-in the following

    block-styles-loading-enhancements-in-wordpress-5-8/

    add_filter( 'should_load_separate_core_block_assets', '__return_true' );