leafac / caxa

📦 Package Node.js applications into executable binaries 📦
https://npm.im/caxa
697 stars 33 forks source link

Instead of replacing the previous executable entirely, it adds content of the previous executable to the new one and then replaces it. #75

Closed khan-zia closed 1 year ago

khan-zia commented 1 year ago

Hi,

I have just noticed a weird behavior. I have seen this on Windows at least. to reproduce, simply run caxa to produce an executable. Next, note the size of the .exe file. Then, run the exact same caxa command again. The expected behavior is to replace the previous executable entirely by default but you will notice that the size of the new executable has exactly doubled. To further prove the point, run the caxa command for the third time and the size will be tripled.

papb commented 1 year ago

Why did you close the issue?

khan-zia commented 1 year ago

@papb Because it was a simple misunderstanding. When you run caxa to produce an exe, you will need to make sure the exe is outputted to a directory that's outside your project's main files. In other words, make sure to exclude the output folder from being included in the bundle that caxa produces.

unphased commented 1 year ago

Yes I ran into this when the input is .... the previous caxa .exe got bundled in so the new .exe became nearly 100MB instead of the expected 40MB.