Kojo.gg
Kojo.gg
DDeno
Created by Kojo.gg on 8/30/2024 in #help
@deno/emit's transpile with JSR
Do I miss something or @deno/emit don't work with JSR? I am trying to do JSX DOM Client Component, hono/jsx/dom, not just hono/jsx which is SSR. I'm also surprise this emit package is not in @std but in a strange @deno, its legit? server.tsx
import { transpile } from "@deno/emit";

const url = new URL("./client.tsx", import.meta.url);
const result = await transpile(url);
import { transpile } from "@deno/emit";

const url = new URL("./client.tsx", import.meta.url);
const result = await transpile(url);
client.tsx
import { render, useState } from "@hono/hono/jsx/dom";
import { render, useState } from "@hono/hono/jsx/dom";
Termial output
Error: Relative import path "@hono/hono/jsx/dom" not prefixed with / or ./ or ../: Relative import path "@hono/hono/jsx/dom" not prefixed with / or ./ or ../: Relative import path "@hono/hono/jsx/dom" not prefixed with / or ./ or ../
at __wbg_new_28c511d9baebfa89 (https://jsr.io/@deno/emit/0.44.0/emit.generated.js:557:19)
at <anonymous> (file:///home/eric/.local/share/deno-wasmbuild/04dbfb768c553d942c8cf19ddaf40bd5fcbdf1051aa008efa8f1839820145853.wasm:1:3275940)
at <anonymous> (file:///home/eric/.local/share/deno-wasmbuild/04dbfb768c553d942c8cf19ddaf40bd5fcbdf1051aa008efa8f1839820145853.wasm:1:247440)
at <anonymous> (file:///home/eric/.local/share/deno-wasmbuild/04dbfb768c553d942c8cf19ddaf40bd5fcbdf1051aa008efa8f1839820145853.wasm:1:1817650)
at <anonymous> (file:///home/eric/.local/share/deno-wasmbuild/04dbfb768c553d942c8cf19ddaf40bd5fcbdf1051aa008efa8f1839820145853.wasm:1:2917318)
at __wbg_adapter_46 (https://jsr.io/@deno/emit/0.44.0/emit.generated.js:247:6)
at real (https://jsr.io/@deno/emit/0.44.0/emit.generated.js:231:14)
at ext:core/01_core.js:308:9
at eventLoopTick (ext:core/01_core.js:174:7)
Error: Relative import path "@hono/hono/jsx/dom" not prefixed with / or ./ or ../: Relative import path "@hono/hono/jsx/dom" not prefixed with / or ./ or ../: Relative import path "@hono/hono/jsx/dom" not prefixed with / or ./ or ../
at __wbg_new_28c511d9baebfa89 (https://jsr.io/@deno/emit/0.44.0/emit.generated.js:557:19)
at <anonymous> (file:///home/eric/.local/share/deno-wasmbuild/04dbfb768c553d942c8cf19ddaf40bd5fcbdf1051aa008efa8f1839820145853.wasm:1:3275940)
at <anonymous> (file:///home/eric/.local/share/deno-wasmbuild/04dbfb768c553d942c8cf19ddaf40bd5fcbdf1051aa008efa8f1839820145853.wasm:1:247440)
at <anonymous> (file:///home/eric/.local/share/deno-wasmbuild/04dbfb768c553d942c8cf19ddaf40bd5fcbdf1051aa008efa8f1839820145853.wasm:1:1817650)
at <anonymous> (file:///home/eric/.local/share/deno-wasmbuild/04dbfb768c553d942c8cf19ddaf40bd5fcbdf1051aa008efa8f1839820145853.wasm:1:2917318)
at __wbg_adapter_46 (https://jsr.io/@deno/emit/0.44.0/emit.generated.js:247:6)
at real (https://jsr.io/@deno/emit/0.44.0/emit.generated.js:231:14)
at ext:core/01_core.js:308:9
at eventLoopTick (ext:core/01_core.js:174:7)
deno.json
{
"compilerOptions": {
"jsx": "precompile",
"jsxImportSource": "@hono/hono/jsx"
},
"imports": {
"@deno/emit": "jsr:@deno/emit@^0.44.0",
"@hono/hono": "jsr:@hono/hono@^4.5.6"
},
}
{
"compilerOptions": {
"jsx": "precompile",
"jsxImportSource": "@hono/hono/jsx"
},
"imports": {
"@deno/emit": "jsr:@deno/emit@^0.44.0",
"@hono/hono": "jsr:@hono/hono@^4.5.6"
},
}
I need this deno compilerOptions for my hono/jsx SSR config
14 replies
DDeno
Created by Kojo.gg on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
No description
22 replies
DDeno
Created by Kojo.gg on 11/20/2023 in #help
Minimal code for Preact SSR
What's the actual code to do some Preact SSR with Deno? For example something simple like a counter that is incremented by 1 each seconds. Ideally something that could run on a Deno Deploy Playground without any deno.json
7 replies
DDeno
Created by Kojo.gg on 11/16/2023 in #help
BroadcastChannel vs EventSource vs WebSocket
Why would one uses BroadcastChannel, over EventSource, or WebSocket? Could anyone provide clear examples, advantages, and inconvenient of them? Are they all available on Deno Deploy?
5 replies
DDeno
Created by Kojo.gg on 11/13/2023 in #help
“Log streaming API” on Deno Deploy
What does “Log streaming API” refers to in the analytics section of the pricing page of Deno Deploy?
3 replies
DDeno
Created by Kojo.gg on 10/18/2023 in #help
Deno equivalent os.cpus().length
What’s the Deno Equivalent for os.cpus().length?
7 replies
DDeno
Created by Kojo.gg on 12/6/2022 in #help
What is the best database service to plug into your application hosted on Deno Deploy?
Deno Deploy is hosted on Google Cloud, but I was wondering: is a database service from another company, but also hosted on Google Cloud, would result in a good latency that resolve inside the same region datacenter, or will it fatally get out in the internet and induce terrible latency? What about a database service hosted on AWS then? Is anybody have numbers to share?
11 replies