-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
output to node
(Node.js) to be more runtime-agnostic
#195
Labels
enhancement
New feature or request
Comments
This was referenced Aug 12, 2024
Closed
This was referenced Aug 20, 2024
Merged
This was referenced Aug 27, 2024
aralroca
changed the title
Export to
output to Sep 1, 2024
node
to be more runtime-agnostic (by default bun
)node
(Node.js) to be more runtime-agnostic
This was referenced Sep 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Brisa was initially built with Bun, and there are Bun APIs that must continue to be used in runtime to go faster, such as
Bun.serve
, but we must adapt it to be more runtime-agnostic and if developers want the build can be generated and executed with Node.js. To do this it is necessary to indicate the type of output asnode
to apply different module resolution rules and optimizations.Bun runtime dependencies to change to be compatible with Node:
Bun.FileSystemRouter
to ownfileSystemRouter
implementation #390serve
andhandler
to serve Node.js Brisa app #442import.meta.main
from "serve" to argv to be Node.js compatible #405Bun.fileURLToPath
tofileURLToPath
fromnode:url
#392import.meta.resolveSync
(deprecated) , used ingetImportableFilepath
, change torequire.resolve
#391Bun.file
to Node APIs #427Bun.openInEditor
for other runtimes than Bun (only used in dev) #436Bun.escapeHTML
to own implementation #389Bun.enableANSIColors
to our implementation #396Bun.main
used in constants to know if is serve process #394Bun.hash
alternative for runtime-agnostic #407Bun.nanoseconds
alternative for runtime-agnostic #409Bun.env
toprocess.env
to be more runtime-agnostic #398Bun.readableStreamToText
onrenderToString
runtime-agnostic #400The text was updated successfully, but these errors were encountered: