-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Modules do not load or work in the full site editor (FSE) #69351
Copy link
Copy link
Open
Labels
[Feature] Script Modules APIRelated to the Script Modules API that adds support for native ES modules and import mapsRelated to the Script Modules API that adds support for native ES modules and import maps[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Metadata
Metadata
Assignees
Labels
[Feature] Script Modules APIRelated to the Script Modules API that adds support for native ES modules and import mapsRelated to the Script Modules API that adds support for native ES modules and import maps[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
When using scripts as modules, there does not seem to be a way to register them in a way that they load with blocks in the Site Editor. I have tried registering the module, enqueuing the module, setting the handle int he script, editorScript, viewScriptModule, everything. The most it will do it load outside the iframe of the Site Editor, but the blocks load inside the iframe so the module JS is never fired. The modules seem to load and work fine when editing a page or viewing it on the frontend. But blocks don't work when going to Appearance -> Editor and viewing a page in the Site Editor context.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.