Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment: A Modules API with optional static server dependency graph #56118

Closed
Prev Previous commit
Add polyfill
  • Loading branch information
luisherranz committed Nov 17, 2023

Verified

This commit was signed with the committer’s verified signature.
florianduros Florian Duros
commit cf43d0ca001044229ff5f50b40c3b44a8ec78dcc
12 changes: 12 additions & 0 deletions lib/experimental/interactivity-api/modules.php
Original file line number Diff line number Diff line change
@@ -18,6 +18,18 @@ function gutenberg_register_interactivity_module() {
'version' => defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' ),
)
);

// TODO: Move this to a local file and replace with a simpler version that
// only provides support for import maps.
wp_enqueue_script(
'es-module-shims',
'https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js',
array(),
null,
array(
'strategy' => 'defer',
)
);
}

add_action( 'wp_enqueue_scripts', 'gutenberg_register_interactivity_module' );