-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BlockJsonDependenciesPlugin to modules build #57927
Conversation
Size Change: 0 B Total Size: 1.69 MB ℹ️ View Unchanged
|
This needs a changelog entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for ensuring that any changes to block.json
get picked up in the watch mode.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core SVNCore Committers: Use this line as a base for the props when committing in SVN:
GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
6d82697
to
c6cb4a3
Compare
c6cb4a3
to
7c285c9
Compare
Add a plugin that finds block.json files and adds them as fileDependencies of the module build. This ensures that changes to block.json files trigger updates to the module build. See https://webpack.js.org/contribute/plugin-patterns/ > You may also feed new file paths into the watch graph to receive > compilation triggers when those files change. Add valid file paths > into the `compilation.fileDependencies` Set to add them to the > watched files.
7c285c9
to
66082a2
Compare
What?
Add a plugin that finds block.json files and adds them as
fileDependencies of the module build. This ensures that changes to
block.json files trigger updates to the module build.
See https://webpack.js.org/contribute/plugin-patterns/
d_.mov
Why?
@gziolo noticed that changes to block.json files wouldn't trigger changes to the module build (#57461 (comment))
Testing Instructions
To test this, you'll want to check this out and link it to a project that depends on @wordpress/scripts.
If you use
wp-scripts start
, changes to anyblock.json
files in the project should trigger a rebuild. Changes to theviewModule
field should change the compilation.