Skip to content

Commit e2e487f

Browse files
Make sure calls to forwardRef are marked as pure (#1192)
* Make sure calls to `forwardRef` are marked as pure * Update changelog
1 parent cafc7d6 commit e2e487f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- Nothing yet!
10+
### Fixed
11+
12+
- Improve tree-shakability of React package ([#1192](https://github.com/tailwindlabs/heroicons/pull/1192))
1113

1214
## [2.1.3] - 2024-03-22
1315

scripts/build.js

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ let transform = {
2323
code = lines.join('\n')
2424
}
2525

26+
code = code.replace('React.forwardRef(', '/*#__PURE__*/ React.forwardRef(')
27+
2628
if (format === 'esm') {
2729
return code
2830
}

0 commit comments

Comments
 (0)