I recently changed a site that uses ES Modules to use wp_enqueue_script_module for them. This worked fine on the front end, and in the admin, and in the post editor, but the module is not loaded in the site editor.
Step-by-step reproduction instructions
Enqueue a module during enqueue_block_assets. Hopefully one with a side effect you can see
Edit the site in the site editor
Notice that the module has not loaded or executed in the content frame.
Screenshots, screen recording, code snippet
No response
Environment info
WordPress 6.6
Please confirm that you have searched existing issues in the repo.
[X] Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Could be that _wp_get_iframed_editor_assets doesn't process script modules. But I'm terrible at navigating the source repositories to find things like that, so take it with a grain of salt.
Description
I recently changed a site that uses ES Modules to use
wp_enqueue_script_module
for them. This worked fine on the front end, and in the admin, and in the post editor, but the module is not loaded in the site editor.Step-by-step reproduction instructions
enqueue_block_assets
. Hopefully one with a side effect you can seeScreenshots, screen recording, code snippet
No response
Environment info
WordPress 6.6
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.