Skip to content

Commit

Permalink
Make sure calls to forwardRef are marked as pure (#1192)
Browse files Browse the repository at this point in the history
* Make sure calls to `forwardRef` are marked as pure

* Update changelog
  • Loading branch information
thecrypticace authored Jun 17, 2024
1 parent cafc7d6 commit e2e487f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Improve tree-shakability of React package ([#1192](https://github.com/tailwindlabs/heroicons/pull/1192))

## [2.1.3] - 2024-03-22

Expand Down
2 changes: 2 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ let transform = {
code = lines.join('\n')
}

code = code.replace('React.forwardRef(', '/*#__PURE__*/ React.forwardRef(')

if (format === 'esm') {
return code
}
Expand Down

0 comments on commit e2e487f

Please sign in to comment.