Describe the bug:
Running the production build (npm run build) generates the distributable plugin archive google-listings-and-ads.zip in the plugin root, but the resulting file is approximately 236 MB, whereas the expected size is approximately 8.4 MB.
For reference, the project's own bundlewatch configuration in package.json asserts the zip should be at most 8.43 mB:
{
"path": "./google-listings-and-ads.zip",
"maxSize": "8.43 mB",
"compression": "none"
}
A 236 MB artifact is ~28x the expected size and is not suitable for distribution/upload.
Steps to reproduce:
- Clone the repository (
develop branch).
- From the plugin root, run:
npm i && composer i && npm run build
- Check the generated
google-listings-and-ads.zip in the main plugin folder (created by the postbuild -> archive scripts).
Expected behavior:
The build produces google-listings-and-ads.zip at roughly 8.4 MB, containing only the runtime files needed to ship the plugin (e.g. src, js/build, production vendor, languages, views, main plugin PHP files), with development/build artifacts excluded.
Actual behavior:
The generated google-listings-and-ads.zip is approximately 236 MB. The archive appears to include files that should be excluded from the distributable package (development dependencies and/or build tooling artifacts such as node_modules, dev vendor packages, .git, tests, etc.).
Additional details:
- Attached files via different source:
Plugin File from stable release:
google-listings-and-ads.zip
Plugin File from npm run build release:
Describe the bug:
Running the production build (
npm run build) generates the distributable plugin archivegoogle-listings-and-ads.zipin the plugin root, but the resulting file is approximately 236 MB, whereas the expected size is approximately 8.4 MB.For reference, the project's own
bundlewatchconfiguration inpackage.jsonasserts the zip should be at most8.43 mB:{ "path": "./google-listings-and-ads.zip", "maxSize": "8.43 mB", "compression": "none" }A 236 MB artifact is ~28x the expected size and is not suitable for distribution/upload.
Steps to reproduce:
developbranch).npm i && composer i && npm run buildgoogle-listings-and-ads.zipin the main plugin folder (created by thepostbuild->archivescripts).Expected behavior:
The build produces
google-listings-and-ads.zipat roughly 8.4 MB, containing only the runtime files needed to ship the plugin (e.g.src,js/build, productionvendor,languages,views, main plugin PHP files), with development/build artifacts excluded.Actual behavior:
The generated
google-listings-and-ads.zipis approximately 236 MB. The archive appears to include files that should be excluded from the distributable package (development dependencies and/or build tooling artifacts such asnode_modules, devvendorpackages,.git, tests, etc.).Additional details:
Plugin File from stable release:
google-listings-and-ads.zip
Plugin File from
npm run buildrelease: