Skip to content

Commit 21c0b41

Browse files
committed
Add an exclusion to prevent building full-page of interactivity-router
The full-page wpScriptModuleExport defined in interactivity-router should not be bundled in Wordpress core yet as it is experimental. There is no mechanism in wpScriptModuleExports right now that supports building a script module but not including it in core. Since this is likely to be a rare instance we have opted to hard-code an exclusion in core's build until this module is no longer experimental.
1 parent 33d4edd commit 21c0b41

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/webpack/script-modules.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ for ( const packageName of MODULES.concat( SCRIPT_AND_MODULE_DUAL_PACKAGES ) ) {
4848
for ( const [ exportName, exportPath ] of Object.entries(
4949
wpScriptModuleExports
5050
) ) {
51+
// Exclude the experimental './full-page' export from @wordpress/interactivity-router.
52+
// This export is defined in Gutenberg's package.json but should not be bundled in Core
53+
// as the feature is still experimental and not ready for inclusion.
54+
if ( moduleName === 'interactivity-router' && exportName === './full-page' ) {
55+
continue;
56+
}
57+
5158
if ( typeof exportPath !== 'string' ) {
5259
throw new Error( 'wpScriptModuleExports paths must be strings' );
5360
}

0 commit comments

Comments
 (0)