-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
We haven't done any testing with Deno internally, so at this point I think you're the expert on Framework+Deno 🙂. What kind of problems do you run into? |
Beta Was this translation helpful? Give feedback.
-
Are you asking to write data loaders using Deno? Or for Framework itself to use Deno (for the build and preview commands, say)? Or perhaps you want to use Framework as an API (library) within Deno? The first of these should be the easiest of the three. It should be readily doable to switch from Node to Deno for JavaScript (.js) and TypeScript (.ts) data loaders. The only challenge is that they both compete for the same file extensions. So either we’ll need the config file to declare a preference for Deno, or we’ll need some other hint such as a shebang that we should use a different interpreter. If this is what you’re interested in, do you have preference? |
Beta Was this translation helpful? Give feedback.
-
I just tested the Deno v2 release candidate. It works without problems so far. Instead of Same thing for the other commands. |
Beta Was this translation helpful? Give feedback.
-
Hijacking this to add some tips for Deno data loaders:
export default {
interpreters: {
".ts": ["deno", "--env-file", "--allow-env", "--allow-net", "--allow-read"]
},
}; (Or whichever Deno flags you need for your project)
{
"nodeModulesDir": "manual"
}
const writer = Deno.stdout.writable.getWriter();
await writer.write(buffer);
await writer.close(); I'll try and add more as I run into them, but it's pretty seamless so far. |
Beta Was this translation helpful? Give feedback.
I just tested the Deno v2 release candidate. It works without problems so far.
Instead of
npm run dev
, usedeno task dev
.Same thing for the other commands.