Open aralroca opened 6 months ago
Maybe we can use this: https://srvx.unjs.io/
The other is to generate a deno.json
with the import-maps to resolve the Node build-in and some mismatches during the build with Bun
Ex:
{
"imports": {
"fs/promises": "node:fs/promises",
"path": "node:path"
},
"permissions": {
"read": true,
"write": true,
"run": "inherit"
}
}
FYI: Currently Deno works with output: "node",
although it has no optimization since in Node.js the requests and response are transformed in runtime and does not use Deno.serve
and only reads the deno.json
if it is manually moved inside the build folder.
This is a good sign that soon output: "deno"
will be available after adding these optimizations. I have updated the missing points to be done this week and Deno will be available in the next release.
Brisa was initially built with Bun, and there are Bun APIs that must continue to be used in runtime to go faster, like
Bun.serve
, but it is necessary to adapt it to be more runtime-agnostic and if the developers want the build can be generated and executed with Deno. To do this it is necessary to indicate the type of output because different module resolution rules and optimizations will be made. We did the same with Node.js in the past (now Node.js is a viable output), before version 1.0 it would be nice to do the same with Deno.TODO:
deno
availablenode:
prefix to Node built-in modules. We already added them, but in build-time, the Bun bundler is removing them, so we probably need to make some post-build changes, since Bun does not support Deno as output, we will have to make some adaptations.deno.json
and move tobuild
folderDeno.serve
idleTimeout
config in Deno serverbrisa start
should work with DenoBun.openInEditor
in Deno and return 404