Make WordPress Core

Opened 18 hours ago

Closed 16 hours ago

#64124 closed defect (bug) (fixed)

Fix: Make block editor a script/module dual package so fit text loads on frontend.

Reported by: jorgefilipecosta's profile jorgefilipecosta Owned by: ellatrix's profile ellatrix
Milestone: 6.9 Priority: normal
Severity: normal Version:
Component: Editor Keywords: gutenberg-merge has-patch
Focuses: Cc:

Description

Fit text is a block support under block-editor, that needs assets on the front end. Block editor now exposes wpScriptModuleExports and needs to be included SCRIPT_AND_MODULE_DUAL_PACKAGES.
This tocket tracks that change which is being proposed at https://github.com/WordPress/wordpress-develop/pull/10373.

Change History (2)

This ticket was mentioned in PR #10373 on WordPress/wordpress-develop by @jorgefilipecosta.


18 hours ago
#1

  • Keywords has-patch added

Fit text is a block support under block-editor, that needs assets on the front end, so block editor now exposes wpScriptModuleExports and needs to be included SCRIPT_AND_MODULE_DUAL_PACKAGES.
My commit just does the inclusion.
Changes at src/wp-includes/assets/script-modules-packages.min.php were automatically generated after "npm run build:dev"

Ticket: https://core.trac.wordpress.org/ticket/64124

## Testing
Go to the editor, add a paragraph, write some text, enable fit text.
Verify fit text works on the editor (was already the case).
Publish the post.
Verify fit text works on the front end (it was not the case).

#2 @ellatrix
16 hours ago

  • Owner set to ellatrix
  • Resolution set to fixed
  • Status changed from new to closed

In 61027:

Block editor: make block-editor a script/module dual package.

Fit text is a block support under block-editor, that needs assets on the front-end, so block editor now exposes wpScriptModuleExports and needs to be included in SCRIPT_AND_MODULE_DUAL_PACKAGES, in order for its script modules to be registered and loaded.

See https://github.com/WordPress/wordpress-develop/pull/10373.

Props jorgefilipecosta.
Fixes #64124.

Note: See TracTickets for help on using tickets.