Skip to content

Commit a0f25ac

Browse files
Migrate bundlesize to size-limit (#346)
* fix: replace bundlesize with size-limit (it depended on a severely broken package libort) * fix: replace bundlesize with size-limit * fix: replace bundlesize with size-limit
1 parent f84596b commit a0f25ac

File tree

3 files changed

+375
-596
lines changed

3 files changed

+375
-596
lines changed

packages/class-variance-authority/package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,23 @@
4040
"build:cjs": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.js -C module.type=commonjs",
4141
"build:esm": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.mjs -C module.type=es6 ",
4242
"build:tsc": "tsc --project .config/tsconfig.build.json",
43-
"bundlesize": "pnpm build && bundlesize -f 'dist/*.js' -s 1.2KB",
43+
"bundlesize": "pnpm build && size-limit",
4444
"check": "tsc --project tsconfig.json --noEmit",
4545
"prepublishOnly": "pnpm build"
4646
},
4747
"dependencies": {
4848
"clsx": "^2.1.1"
4949
},
5050
"devDependencies": {
51+
"@size-limit/preset-small-lib": "^11.2.0",
5152
"@swc/cli": "0.3.12",
5253
"@swc/core": "1.4.16",
5354
"@types/node": "20.12.7",
5455
"@types/react": "18.2.79",
5556
"@types/react-dom": "18.2.25",
56-
"bundlesize": "0.18.2",
5757
"react": "18.2.0",
5858
"react-dom": "18.2.0",
59+
"size-limit": "^11.2.0",
5960
"ts-node": "10.9.2",
6061
"typescript": "5.7.3"
6162
},
@@ -73,5 +74,11 @@
7374
"main": "dist/index.js",
7475
"module": "dist/index.mjs",
7576
"types": "dist/index.d.ts"
76-
}
77+
},
78+
"size-limit": [
79+
{
80+
"path": "dist/index.js",
81+
"limit": "1.2KB"
82+
}
83+
]
7784
}

packages/cva/package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"build:cjs": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.js -C module.type=commonjs",
3636
"build:esm": "swc ./src/index.ts --config-file ./.config/.swcrc -o dist/index.mjs -C module.type=es6 ",
3737
"build:tsc": "tsc --project .config/tsconfig.build.json",
38-
"bundlesize": "pnpm build && bundlesize -f 'dist/*.js' -s 1.6KB",
38+
"bundlesize": "pnpm build && size-limit",
3939
"check": "pnpm run '/^check:.*/'",
4040
"check:exports": "attw --pack .",
4141
"check:tsc": "tsc --project tsconfig.json --noEmit",
@@ -47,14 +47,15 @@
4747
},
4848
"devDependencies": {
4949
"@arethetypeswrong/cli": "0.17.3",
50+
"@size-limit/preset-small-lib": "^11.2.0",
5051
"@swc/cli": "0.3.12",
5152
"@swc/core": "1.4.16",
5253
"@types/node": "20.12.7",
5354
"@types/react": "18.2.79",
5455
"@types/react-dom": "18.2.25",
55-
"bundlesize": "0.18.2",
5656
"react": "18.2.0",
5757
"react-dom": "18.2.0",
58+
"size-limit": "^11.2.0",
5859
"ts-node": "10.9.2",
5960
"typescript": "5.7.3"
6061
},
@@ -75,5 +76,11 @@
7576
"main": "dist/index.js",
7677
"module": "dist/index.mjs",
7778
"types": "dist/index.d.ts"
78-
}
79+
},
80+
"size-limit": [
81+
{
82+
"path": "dist/index.js",
83+
"limit": "1.6KB"
84+
}
85+
]
7986
}

0 commit comments

Comments
 (0)