-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expose rendered module code to generateBundle hook #4028
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4028 +/- ##
=======================================
Coverage 97.47% 97.47%
=======================================
Files 192 192
Lines 6773 6775 +2
Branches 1984 1985 +1
=======================================
+ Hits 6602 6604 +2
Misses 84 84
Partials 87 87
Continue to review full report at Codecov.
|
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.
Looks good, I think we can include this as it is, especially with the lazy evaluation. The only things missing to me are doc updates: code
should be added both to 02-javascript-api.md
at line 58 and 05-plugin-development.md
at line 339.
Also I think returning null
instead of undefined
for the tree-shaken case might fit better with other APIs, but this is just my feeling.
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install btd/rollup#expose-rendered-module-code Once a build has completed, you can load it into the REPL by inserting the CircleCI build number of the ci/circleci: node-v12-latest build into the link below (unfortunately, we cannot auto-update this comment for PRs from forks at this time):
|
@lukastaegert thanks. I added docs and changed type to be string | null |
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.
Looks great, thanks!
Thank you |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
This fixes issues i created #3458. I would like to use this info for simple analysis and better code size estimations in visualizer plugin.
Let me know pls, if it could be done better.