aidenybai / million

Optimize React performance and make your React 70% faster in minutes, not months.
https://million.dev
MIT License
15.89k stars 558 forks source link

fix: `log` compiler option #1009

Closed rmnilin closed 1 month ago

rmnilin commented 3 months ago

There was a confusing behavior caused by the strange logic in the compiler logging. It is possible to turn off the logging only if the log option has been set to a truthy value, which is not equal to 'info', because of the condition !ctx.options.log || ctx.options.log === 'info'. However, at the same time, the type of the log option is either boolean | 'info' | undefined, so there is no valid value with type that can turn off the logging. I think that this PR will make the logic of the log option a little clearer.

Status

Semantic versioning classification:

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ā†—ļøŽ

Name Status Preview Comments Updated (UTC)
million-kitchen-sink āœ… Ready (Inspect) Visit Preview šŸ’¬ Add feedback Mar 26, 2024 8:39pm
sink āœ… Ready (Inspect) Visit Preview šŸ’¬ Add feedback Mar 26, 2024 8:39pm
CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

github-actions[bot] commented 2 months ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

rmnilin commented 2 months ago

up

github-actions[bot] commented 2 months ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

lxsmnsyc commented 2 months ago

Related (although yours is earlier): https://github.com/aidenybai/million/pull/1020/files

I'll probably merge this one and just tweak my other PR.

github-actions[bot] commented 1 month ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.