Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#64484 new defect (bug)

viewScriptModule is also being loaded in the block editor

Reported by: vrishabhsk's profile vrishabhsk Owned by:
Milestone: 7.0 Priority: normal
Severity: minor Version: 6.9
Component: Editor Keywords: has-patch reporter-feedback
Focuses: Cc:

Description

viewScriptModule file defined in the block.json is meant to be loaded only in the frontend when the block is displayed but right now is also being loaded in the block editor.

Additional information : https://github.com/WordPress/gutenberg/issues/72833

Change History (2)

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


5 weeks ago
#1

  • Keywords has-patch added
  • Added a is_admin check before the viewScriptModule scripts are enqueued via wp_enqueue_script_module

Trac ticket: https://core.trac.wordpress.org/ticket/64484

#2 @westonruter
5 weeks ago

  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to 7.0

Is this not also an issue for viewScript?

Note: See TracTickets for help on using tickets.