Skip to content

Commit 83bed71

Browse files
committed
(feat) add bundlesize to npm scripts
1 parent 7481c4d commit 83bed71

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"lib"
3333
],
3434
"dependencies": {
35+
"bundlesize": "^0.14.4",
3536
"debounce": "^1.0.0",
3637
"deep-equal": "^1.0.1",
3738
"eventemitter3": "^2.0.2",
@@ -95,6 +96,7 @@
9596
"build": "npm run clean && npm run compile",
9697
"build:umd": "NODE_ENV=development webpack src/index.js dist/react-gpt.js",
9798
"build:umd:min": "NODE_ENV=production webpack -p src/index.js dist/react-gpt.min.js",
99+
"bundlesize": "npm run build:umd:min && bundlesize",
98100
"clean": "rimraf lib coverage",
99101
"compile": "babel src --out-dir lib",
100102
"examples": "webpack-dev-server --config examples/webpack.config.js --content-base examples/apps --inline",
@@ -109,5 +111,11 @@
109111
"commitizen": {
110112
"path": "./node_modules/cz-conventional-changelog"
111113
}
112-
}
114+
},
115+
"bundlesize": [
116+
{
117+
"path": "./dist/react-gpt.min.js",
118+
"maxSize": "8.5 kB"
119+
}
120+
]
113121
}

0 commit comments

Comments
 (0)