Skip to content

Commit e722679

Browse files
authored
ref: move size-limit config to its own file (#9998)
* ref: move size-limit config to its own file to avoid cache busting everything when the limits change * ref: update size-limit
1 parent 1d20c48 commit e722679

File tree

3 files changed

+20
-23
lines changed

3 files changed

+20
-23
lines changed

.size-limit.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[
2+
{
3+
"name": "react full",
4+
"path": "packages/react-query/build/modern/index.js",
5+
"limit": "12.10 kB",
6+
"ignore": ["react", "react-dom"]
7+
},
8+
{
9+
"name": "react minimal",
10+
"path": "packages/react-query/build/modern/index.js",
11+
"limit": "9.11 kB",
12+
"import": "{ useQuery, QueryClient, QueryClientProvider }",
13+
"ignore": ["react", "react-dom"]
14+
}
15+
]

nx.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@
4444
},
4545
"test:size": {
4646
"cache": true,
47-
"inputs": ["{workspaceRoot}/**/package.json"]
47+
"inputs": [
48+
"{workspaceRoot}/package.json",
49+
"{workspaceRoot}/.size-limit.json"
50+
]
4851
},
4952
"test:eslint": {
5053
"cache": true,

package.json

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -89,26 +89,5 @@
8989
"@types/react": "^19.0.1",
9090
"@types/react-dom": "^19.0.2"
9191
}
92-
},
93-
"size-limit": [
94-
{
95-
"name": "react full",
96-
"path": "packages/react-query/build/modern/index.js",
97-
"limit": "12.10 kB",
98-
"ignore": [
99-
"react",
100-
"react-dom"
101-
]
102-
},
103-
{
104-
"name": "react minimal",
105-
"path": "packages/react-query/build/modern/index.js",
106-
"limit": "9.11 kB",
107-
"import": "{ useQuery, QueryClient, QueryClientProvider }",
108-
"ignore": [
109-
"react",
110-
"react-dom"
111-
]
112-
}
113-
]
92+
}
11493
}

0 commit comments

Comments
 (0)