Repository navigation
fix(build): accept splitting in buildOptions - #40
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
asena buildalready passesbuildOptionsthrough toBun.build, sosplitting: trueworks at runtime, but theBuildOptionstype did not list it andasena.config.tsfailed to typecheck with it.This adds
splittingto the pickedBun.BuildConfigkeys. The default stays off. The Website will document the option once this is released.With
splitting: true, dynamically imported code (for example the database driver@asenajs/asena-drizzleloads for the configured type) goes into chunk files next toindex.asena.jsinstead of being inlined. In a minimal bun-sql app the entry file went from 1.67 MB to 91 KB and startup from 51 ms to 45 ms.Typecheck and prettier are clean; patch changeset included.