Skip to content

Commit 7ba1a68

Browse files
committed
fix: docs build
1 parent de9393a commit 7ba1a68

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

packages/qwik-city/src/static/node/node-main.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,9 @@ export async function createNodeMainProcess(sys: System, opts: StaticGenerateOpt
5858

5959
// Launch the worker using the package's index module, which bootstraps the worker thread.
6060
if (typeof __filename === 'string') {
61-
// CommonJS path
62-
const ext = extname(__filename) || '.js';
63-
workerFilePath = join(dirname(__filename), `index${ext}`);
61+
workerFilePath = __filename;
6462
} else {
65-
// ESM path (import.meta.url)
66-
const thisUrl = new URL(import.meta.url);
67-
const pathname = thisUrl.pathname || '';
68-
let ext = '.js';
69-
if (pathname.endsWith('.ts')) {
70-
ext = '.ts';
71-
} else if (pathname.endsWith('.mjs')) {
72-
ext = '.mjs';
73-
}
74-
workerFilePath = new URL(`./index${ext}`, thisUrl);
63+
workerFilePath = import.meta.url;
7564
}
7665

7766
if (typeof workerFilePath === 'string' && workerFilePath.startsWith('file://')) {

0 commit comments

Comments
 (0)