Skip to content

Commit ab59771

Browse files
ryan-williamsclaude
andcommitted
convert drawing/index.js to named exports for tree-shaking
Convert all 56 methods from aggregation pattern (`drawing.method = fn`) to named exports (`export function method(...)`). Update 18 consumer files in the factory bundle to use named imports. Keeps `export default { ... }` for backward compat with 50+ files outside the factory bundle. Factory: 704 KB min (was 707 KB, -3 KB). Modest savings because 40 of 56 methods are still used; the win is in enabling future tree-shaking as more consumers switch to named imports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f54ba06 commit ab59771

File tree

21 files changed

+368
-310
lines changed

21 files changed

+368
-310
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"upstream_full__min_": 4831947,
33
"upstream_basic__min_": 1114816,
4-
"fork_full__min_": 4809599,
5-
"fork_basic__min_": 1095962,
6-
"fork_minimal__min_": 988257,
7-
"fork_lite__min_": 848252,
4+
"fork_full__min_": 4807649,
5+
"fork_basic__min_": 1093881,
6+
"fork_minimal__min_": 986167,
7+
"fork_lite__min_": 846142,
88
"app___upstream_basic": 1115573,
9-
"app___fork_basic": 1096110,
10-
"app___fork_lite": 848344,
11-
"fork_factory__min_": 723903,
12-
"app___fork_factory": 723903
9+
"app___fork_basic": 1094029,
10+
"app___fork_lite": 846234,
11+
"fork_factory__min_": 720668,
12+
"app___fork_factory": 720668
1313
}

perf/thresholds.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"bundleSize": {
33
"lite": {
4-
"expected_bytes": 1803246
4+
"expected_bytes": 1801210
55
},
66
"lite-min": {
77
"expected_bytes": 916326
88
},
99
"minimal": {
10-
"expected_bytes": 2125973
10+
"expected_bytes": 2123964
1111
},
1212
"minimal-min": {
1313
"expected_bytes": 1076875
1414
},
1515
"basic": {
16-
"expected_bytes": 2431057
16+
"expected_bytes": 2429051
1717
},
1818
"basic-min": {
1919
"expected_bytes": 1185641

0 commit comments

Comments
 (0)