Make WordPress Core


Ignore:
Timestamp:
10/27/2025 12:35:43 PM (6 months ago)
Author:
luisherranz
Message:

Interactivity API: Router's experimental full-page script module should not be bundled in WordPress.

The "./full-page" entry defined in the @wordpress/interactivity-router's wpScriptModuleExport field should not be bundled in WordPress Core yet as it is experimental. There is no mechanism in wpScriptModuleExports right now to support building a script module but not including it in WordPress Core. Since this is likely to be a rare instance we have opted to hard-code an exclusion in WordPress Core's build until this module is no longer experimental.

Props samueljseay, westonruter, youknowriad.
Fixes #64137.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/webpack/script-modules.js

    r59083 r61072  
    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' );
Note: See TracChangeset for help on using the changeset viewer.