Skip to content
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 bundlewatch/bundlewatch to dev dependencies. #819

Merged
merged 3 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 167 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@wordpress/dependency-extraction-webpack-plugin": "^2.7.0",
"@wordpress/scripts": "^12.5.0",
"@wordpress/stylelint-config": "^19.0.5",
"bundlewatch": "^0.3.2",
"eslint-import-resolver-webpack": "^0.13.1",
"h2o2": "^8.2.0",
"prettier": "npm:wp-prettier@^2.0.5"
Expand Down Expand Up @@ -89,5 +90,30 @@
"version_replace_paths": [
"src"
]
},
"bundlewatch": {
"files": [
{
"path": "./js/build/*.js",
"maxSize": "2 kB"
},
{
"path": "./js/build/index.js",
"maxSize": "1 mB"
},
{
"path": "./js/build/*.css",
"maxSize": "1 kB"
},
{
"path": "./js/build/index.css",
"maxSize": "8 kB"
},
{
"path": "./google-listings-and-ads.zip",
"maxSize": "12 mB",
"compression": "none"
}
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💅 Personally I would prefer to put these into a separate file like .bundlewatch.config.js and have bundlewatch to automatically read the file, unfortunately currently bundlewatch requires us to specify it in the command line like bundlewatch --config .bundlewatch.config.js (see the documentation), which is an unnecessary friction in my opinion. Hopefully they can support that in the future.

So with that said, good to have this bundlewatch section here in this package.json so that we can just run npx bundlewatch. 👍

}
}