New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow shouldTransformCachedModule to return null #4932
Allow shouldTransformCachedModule to return null #4932
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #4932 +/- ##
=======================================
Coverage 99.01% 99.01%
=======================================
Files 221 221
Lines 8052 8052
Branches 2216 2216
=======================================
Hits 7973 7973
Misses 26 26
Partials 53 53 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
This PR has been released as part of rollup@3.20.3-0. Note that this is a pre-release, so to test it, you need to install Rollup via |
This PR has been released as part of rollup@3.20.3. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Allow
shouldTransformCachedModule
to return null. The hook uses thehookFirst
approach, which only delegates other plugins if the return value is null.rollup/src/utils/PluginDriver.ts
Lines 141 to 154 in 0bcf0a6
Since the types only restricts returning a
boolean
, it makes it that the first plugin that implements this will take precedence over everything. Allowing to return null should fix this.Perhaps there could be discussion if this was intentional.