Skip to content
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

golfing bytes of brisa-element to come back to 3kb #703

Open
aralroca opened this issue Jan 4, 2025 · 0 comments
Open

golfing bytes of brisa-element to come back to 3kb #703

aralroca opened this issue Jan 4, 2025 · 0 comments

Comments

@aralroca
Copy link
Collaborator

aralroca commented Jan 4, 2025

Brisa element: https://github.com/brisa-build/brisa/blob/canary/packages/brisa/src/utils/brisa-element/index.ts

After this PR augmented 110 bytes of the code, so it is now 4kb instead of 3kb. The goal is to reduce these 110 bytes of golfing as much as possible in this file.

To measure, we can use this shell command:

bun build --minify --target=bun brisa/packages/brisa/src/utils/brisa-element/index.ts | wc -c

Also important to verify the tests:

bun test brisa/packages/brisa/src/utils/client-build-plugin/integration.test.tsx --watch

and

bun test brisa/packages/brisa/src/utils/brisa-element/index.test.ts --watch

It appears like 7kb because is not removing the flags, but is a good reference to check to reduce these 110 extra bytes.

Important

Now this task is blocked until this PR will be merged to start golfing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant