-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
[Package] wp-build/packages/wp-build/packages/wp-build[Tool] Dependency Extraction Webpack Plugin/packages/dependency-extraction-webpack-plugin/packages/dependency-extraction-webpack-plugin[Tool] WP Scripts/packages/scripts/packages/scripts[Type] Build ToolingIssues or PRs related to build toolingIssues or PRs related to build tooling[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
What problem does this address?
Changeset 61587 has landed in WordPress and will allow Classic Scripts to depend on Script Modules.
Build tooling should be updated accordingly to detect module dependencies from scripts and include them in the asset file.
This will need to be coordinated with changes when reading the asset files on script registration, for example register_block_type_from_metadata().
What is your proposed solution?
Update relevant build tooling to detect WordPress-provided modules. These modules will only appear in scripts as dynamic import( moduleId ). The modules should be added to the asset files under another key: 'module_dependencies' => array( … ).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Package] wp-build/packages/wp-build/packages/wp-build[Tool] Dependency Extraction Webpack Plugin/packages/dependency-extraction-webpack-plugin/packages/dependency-extraction-webpack-plugin[Tool] WP Scripts/packages/scripts/packages/scripts[Type] Build ToolingIssues or PRs related to build toolingIssues or PRs related to build tooling[Type] EnhancementA suggestion for improvement.A suggestion for improvement.