Scripts: plugin-zip
command does not exclude files not included in files
field
#61171
Labels
plugin-zip
command does not exclude files not included in files
field
#61171
Description
Originally reported in this comment.
The
plugin-zip
command refers to thefiles
field inpackage.json
and allows you to include directories and files other than the default in the zip file:@wordpress/scripts – Block Editor Handbook > plugin-zip
However, if this field is defined, it seems that both
package.json
andreadme.txt
are always included in the zip. This means that if you want to include non-default assets in the plugin-zip command, these two files will always be included. Especially when it comes topackage.json
, you often don't want to include it when you want to publish your plugin.I tried defining package.json as below, but the result did not change.
Log output:
Step-by-step reproduction instructions
npx @wordpress/create-block test-block
cd test-block
files
field inpackage.json
npm run plugin-zip
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: