Conversation
|
I opened a PR to this branch moving |
|
Usually |
|
I did run across a big issue with this recently though: you can only have one entry point. Zephyr allows you can pass in multiple files to make sure you don't dead-code-eliminate code for your other entries. Unless I missed something, this fork doesn't collect all of the imported entries and then run the DCE. I decided to drop the module all together and |
point main to the index in src
Hi,
I wanted to see how much effect
zephyrdead 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 usingbundleso far, because it will fail resolving TypeScript/Assets for me. It should be done. I can't test it.outputdirectory 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