From 6b79e329621c1e3e90a104a5c9894a48485db033 Mon Sep 17 00:00:00 2001 From: Anurag Hazra Date: Thu, 8 Oct 2020 18:18:40 +0530 Subject: [PATCH] build: added bundlesize configs (#77) --- bundlesize.config.json | 8 ++++++++ package.json | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 bundlesize.config.json diff --git a/bundlesize.config.json b/bundlesize.config.json new file mode 100644 index 000000000..a2ca6add0 --- /dev/null +++ b/bundlesize.config.json @@ -0,0 +1,8 @@ +{ + "files": [ + { + "path": "./dist/umd/renderless-components.min.js", + "maxSize": "50kb" + } + ] +} diff --git a/package.json b/package.json index 46e91230f..b2d845e1a 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "build:es": "rimraf ./dist/es && babel --extensions .ts,.tsx ./src --config-file ./babel-config.js --out-dir dist/es", "build:types": "rimraf ./dist/types && tsc --emitDeclarationOnly", "build:umd": "rimraf ./dist/umd && cross-env NODE_ENV=production rollup -c && rollup-plugin-visualizer stats-react.json", + "bundlesize": "bundlesize", "commit": "gacp", "format": "prettier --write \"./**/*.{js,ts,css,less,json,md,html,yml,yaml,pcss,jsx,tsx}\"", "keys": "node scripts/build/keys", @@ -93,6 +94,7 @@ "@typescript-eslint/parser": "4.3.0", "babel-eslint": "10.1.0", "babel-loader": "8.1.0", + "bundlesize": "^0.18.0", "chalk": "4.1.0", "concurrently": "^5.3.0", "conventional-github-releaser": "^3.1.5",