Skip to content

Commit d1dd8cc

Browse files
committed
update to latest size-limit
1 parent eca6d10 commit d1dd8cc

File tree

4 files changed

+433
-1512
lines changed

4 files changed

+433
-1512
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/get-config.js b/get-config.js
2+
index 76ebaee5455b2a4bacb986784bd1b53ad89adeb7..1b092e645b258f4a6533ca88b7d36dbcde4eb6de 100644
3+
--- a/get-config.js
4+
+++ b/get-config.js
5+
@@ -132,7 +132,7 @@ export default async function getConfig(plugins, process, args, pkg) {
6+
} else if (!check.entry) {
7+
if (pkg.packageJson.main) {
8+
processed.files = [
9+
- require.resolve(join(dirname(pkg.path), pkg.packageJson.main))
10+
+ import.meta.resolve(join(dirname(pkg.path), pkg.packageJson.main))
11+
]
12+
} else {
13+
processed.files = [join(dirname(pkg.path), 'index.js')]
14+
@@ -177,7 +177,7 @@ export default async function getConfig(plugins, process, args, pkg) {
15+
for (let i in check.import) {
16+
if (peer.includes(i)) {
17+
check.ignore = check.ignore.filter(j => j !== i)
18+
- imports[require.resolve(i, config.cwd)] = check.import[i]
19+
+ imports[import.meta.resolve(i, config.cwd)] = check.import[i]
20+
} else {
21+
imports[toAbsolute(i, config.cwd)] = check.import[i]
22+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@
6969
"console-testing-library@0.6.1": "patch:console-testing-library@npm%3A0.6.1#./.yarn/patches/console-testing-library-npm-0.6.1-4d9957d402.patch",
7070
"@typescript-eslint/eslint-plugin": "6.12.0",
7171
"@typescript-eslint/parser": "6.12.0",
72-
"typescript": "5.2.2"
72+
"typescript": "5.2.2",
73+
"size-limit@^11.0.1": "patch:size-limit@npm%3A11.0.1#./.yarn/patches/size-limit-npm-11.0.1-05996e44e7.patch",
74+
"size-limit@11.0.1": "patch:size-limit@npm%3A11.0.1#./.yarn/patches/size-limit-npm-11.0.1-05996e44e7.patch"
7375
},
7476
"scripts": {
7577
"build": "yarn build:packages",

packages/toolkit/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"@arethetypeswrong/cli": "^0.13.1",
5353
"@microsoft/api-extractor": "^7.13.2",
5454
"@phryneas/ts-version": "^1.0.2",
55-
"@size-limit/preset-small-lib": "^4.11.0",
55+
"@size-limit/file": "^11.0.1",
56+
"@size-limit/webpack": "^11.0.1",
5657
"@testing-library/react": "^13.3.0",
5758
"@testing-library/user-event": "^13.1.5",
5859
"@types/json-stringify-safe": "^5.0.0",
@@ -85,7 +86,7 @@
8586
"prettier": "^2.2.1",
8687
"query-string": "^7.0.1",
8788
"rimraf": "^3.0.2",
88-
"size-limit": "^4.11.0",
89+
"size-limit": "^11.0.1",
8990
"tslib": "^1.10.0",
9091
"tsup": "^7.2.0",
9192
"tsx": "^3.12.2",
@@ -102,7 +103,8 @@
102103
"lint": "eslint src examples",
103104
"test": "vitest",
104105
"type-tests": "yarn tsc -p src/tests/tsconfig.typetests.json && yarn tsc -p src/query/tests/tsconfig.typetests.json",
105-
"prepack": "yarn build"
106+
"prepack": "yarn build",
107+
"size": "size-limit"
106108
},
107109
"files": [
108110
"dist/",

0 commit comments

Comments
 (0)