Integrate zephyr dead code elimination #158
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I wanted to see how much effect
zephyr
dead code elimination would have on a production build. It shaved of ~ 80 kb (gzipped) / 535 kb (zipped) / 50+ % (if I'm not mistaken).So I'm sold on trying to integrate it in the build. Here is a draft PR, that shows the current integration.
If you want to give it a try, there is a pre-compiled branch and you can use it like this in
package.json
:Discussion
I've still open questions. That's why this is a draft.
bundle
. I'm not usingbundle
so far, because it will fail resolving TypeScript/Assets for me. It should be done. I can't test it.output
directory both for the compile and zephyr step. This avoids created a temporary folder. It seems to work fine for me. Could this lead to issues?Issues
Closes #143