Skip to content

Commit

Permalink
Add polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
luisherranz committed Nov 17, 2023
1 parent ac7ed7d commit cf43d0c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/experimental/interactivity-api/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

0 comments on commit cf43d0c

Please sign in to comment.