Automate the declaration of asset dependencies in PHP via bundler
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 384
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 77
Description
Gutenberg is using a tool to automatically maintain awareness of which asset needs which other assets as dependencies in PHP, using [`DependencyExtractionWebpackPlugin`](https://www.npmjs.com/package/@wordpress/dependency-extraction-webpack-plugin).
In Site Kit we maintain all dependencies manually, which occasionally has led to errors and overall is a very error-prone approach given the amount of JS assets we have. We should consider automating this, similar to how Gutenberg does.
This was originally explored in a draft PR #1521.
---------------
_Do not alter or remove anything below. The following sections will be managed by moderators only._
## Acceptance criteria
*
## Implementation Brief
*
### Test Coverage
*
### Visual Regression Changes
*
## QA Brief
*
## Changelog entry
*
Contributor guide
Research direction
Start by reviewing the existing manual asset dependency declarations and the earlier draft PR #1521, then compare the approach with Gutenberg’s DependencyExtractionWebpackPlugin. Done means dependencies are generated automatically for the relevant PHP-registered assets, with the current manual error-prone process replaced or appropriately integrated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php, webpack, wordpress
- Domain
- backend, build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100