https://www.boundaryml.com logo
🟡 Optimizing BAML bundle size in Next.js
# questions
j
Is there a recommended/optimised way to bundle BAML into our nextjs such that it doesn't take 57MB I ran a check on my function sizes after the build & the BAML inclusion is very large:
Copy code
node_modules/.pnpm/@boundaryml+baml-linux-x64-gnu@0.220.0 58.7 MB
Appreciate any guidance on this!
v
sadly not yet possible, but we are actively working on making this much smaller! We've got it down to <6MB here (we've added new ci/cd flags) https://github.com/BoundaryML/baml/blob/canary/baml_language/.ci/size-gate/x86_64-unknown-linux-gnu.toml
we're hoping to release this version of the compiler this month!
but its been a huge effort adding all of this so its been a bit slow to ship!
j
🔥 I can imagine this would be a massive change underneath. Well done!! Looking forward to it