Closed jchris closed 9 months ago
The biggest next step is to try a build that uses browser crypto instead and see how far we get:
I think testing without included crypto in the bundle can be done by changing the require and building and testing. Assuming browsers work great we can then see how light it is and make the IIFE build that light.
I think we only need the heavy crypto in the node build https://github.com/fireproof-storage/fireproof/blob/main/packages/fireproof/scripts/settings.js#L93
we should probably enable the optional banners during this testing it makes it easier to track what's happening https://github.com/fireproof-storage/fireproof/blob/main/packages/fireproof/scripts/settings.js#L33
got it down to 500kb with #15 -- that's about 10x smaller
The current esbuild system is in
scripts/settings.js
. It works but it bundles a bunch of crypto we don't need. Check outgetDefaultRandom()
hereThere is currently an unused
scripts/rollup.js
configuration waiting for someone to polyfill Buffer. It's targetted bynpm run build:rollup
and ready for you to hack around on.Here's what my acceptance process looks like. Any help optimizing that would be rad too.
If all you do is try different builds and leave notes here, that's useful too.