#Deno's Qwik City SSG

6 messages · Page 1 of 1 (latest)

tame solstice
#

Does anyone deep dived into SSG Generation workers ? (qwik-city/src/static/...)

I am trying to build Qwik project with Deno only (althrough i know it is not built for it).
However, It works fine all the way until "Starting Qwik City SSG..."
Where we get Deno not implemented.

I tried to rewrite this part and rebuild qwik-city.
most of node built-in are compatible, i rewrote use of globals __filename , process
and the build script (externals)
Once built & injected into my project workers just exit with code 0.

Here is a boilerplate of the build script for my qwik project

import { build } from "vite";
// ...

// reproduction of npm scripts build.client, build.server, build.types i used to see.
console.info(`Client build`) // build.client 
await build(config) 

console.info(`Server build`) // build.server
await build({
    ...config,
    ssr: {
        target: "webworker",
        noExternal: true
    },
    plugins: [
        ...config.plugins || [],
        denoServerAdapter({
            ssg: {
                include: ["/*"],
                origin: "http://localhost",
            }
        }),
    ],
    build: {
        ssr: true,
        rollupOptions: {
            input: ["~/entry.deno.ts", "~/entry.ssr.tsx", "@qwik-city-plan"],
        },
        minify: false,
    },
});

Deno.exit(0);
#

Deno's Qwik City SSG

jaunty sapphire
#

I have a branch in the works for V2 that might fix that

tame solstice
#

I discovered there were two errors.
I was able to fix the first one (Deno not implemented),
but I still had a problem with the missing client manifest.

Indeed, you've already found the root of the error (https://github.com/QwikDev/qwik/issues/7565#issuecomment-2970766033),
since deno is compatible enough i simply had to add || sys.env === 'deno' to sys.env === 'node'

GitHub

Which component is affected? Qwik Runtime Describe the bug I am creating a new project using bun 1.2 bun create qwik@latest Then I add a bun adapter bun run qwik add bun Then I can run project usin...

#

✅ Solved

jaunty sapphire
#

In V2 that code will all be gone ☺️