Skip to content

fix - verbose bundle size output is no longer [object Object] #97

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

Merged
merged 4 commits into from
Dec 21, 2022

Conversation

omerg
Copy link
Contributor

@omerg omerg commented Nov 30, 2022

This fixes the console output of individual file stats when verbose parameter is provided. Prior to the change, size of a file was not printed correctly:

Before:
[sourceMappingURL], size: [object Object] bytes

After:
[sourceMappingURL], size: 35 bytes

Copy link
Member

@hurali97 hurali97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR, highly appreciated 🚀 If you could address the requested change, that would be so great 👍🏻

@IjzerenHein
Copy link
Collaborator

Fixes #73

@omerg omerg requested a review from hurali97 December 16, 2022 23:51
@hurali97
Copy link
Member

@omerg Thanks for addressing changes. I notice CI is failing due to node 12 not supporting the optional chaining. Can you re-address and remove the optional chaining operator (?), like so:

Previously:
chalk.green(file + ', size: ' + bundle.files[file]?.size + ' bytes')

Now:
chalk.green(file + ', size: ' + bundle.files[file].size + ' bytes')

@omerg
Copy link
Contributor Author

omerg commented Dec 20, 2022

@omerg Thanks for addressing changes. I notice CI is failing due to node 12 not supporting the optional chaining. Can you re-address and remove the optional chaining operator (?), like so:

Previously: chalk.green(file + ', size: ' + bundle.files[file]?.size + ' bytes')

Now: chalk.green(file + ', size: ' + bundle.files[file].size + ' bytes')

Thanks for flagging @hurali97 , chaining operator is removed now 👍

@hurali97 hurali97 merged commit 4ea7693 into callstack:main Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants