-
Notifications
You must be signed in to change notification settings - Fork 92
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
fix: empty code error #134
Conversation
Surfacing some of my notes/comments from debugging for additional context/musings on the solution:
|
@0xdevalias thanks for pointing this out, added a commit to verify that there's no extra processing on the top level @j4k0xb thank you so much for your great pull requests! Creating a new release with them soon |
No need to unminify empty files
if (code.trim().length === 0) { | ||
verbose.log(`Skipping empty file ${file.path}`); | ||
continue; | ||
} |
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.
@0xdevalias thanks for pointing this out, added a commit to verify that there's no extra processing on the top level
Originally posted by @jehna in #134 (comment)
@jehna This was a suggestion I made only as a quick/dirty hacky workaround. By skipping files at the unminify
level you technically weaken the flexibility of the plugins; as it means a plugin can no longer take potentially empty code as input, and have valid code as output. While that's technically not an issue with how things are currently implemented; the other solutions I mentioned would solve this better/more flexibly.
Closes #111