Make WordPress Core


Ignore:
Timestamp:
02/08/2024 10:39:24 AM (2 years ago)
Author:
gziolo
Message:

Editor: Add viewScriptModule handling to block.json metadata

Syncing changes from the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/57437.

Scripts and styles can be registered for blocks via block.json metadata. There is now a Modules API, but was no way to register or associate module assets with blocks via block.json.

Fixes #60233.
Props jonsurrell, gziolo, cbravobernal, luisherranz, youknowriad.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/data/blocks/notice/block.json

    r57493 r57565  
    6969    "script": "tests-notice-script",
    7070    "viewScript": [ "tests-notice-view-script", "tests-notice-view-script-2" ],
     71    "viewScriptModule": [ "tests-notice-view-script-module", "tests-notice-view-script-module-2" ],
    7172    "editorStyle": "tests-notice-editor-style",
    7273    "style": [ "tests-notice-style", "tests-notice-style-2" ],
Note: See TracChangeset for help on using the changeset viewer.