Skip to content

Commit d9ed84b

Browse files
committed
Move Pyodide and Glasgow into a worker.
1 parent 875f15d commit d9ed84b

File tree

13 files changed

+929
-352
lines changed

13 files changed

+929
-352
lines changed

build.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ const options = {
5151
entryPoints: {
5252
'index': 'src/index.html',
5353
'app': 'src/app.tsx',
54+
'app.worker': 'src/worker.ts',
55+
'builder.worker': 'src/builder/worker.ts',
5456
'pyodide.asm': 'src/vendor/pyodide/pyodide.asm.wasm',
5557
},
5658
} satisfies esbuild.BuildOptions;
@@ -65,7 +67,7 @@ if (mode === 'build' || mode === 'minify') {
6567
await context.rebuild();
6668
await context.watch();
6769
// Specifying `servedir` is necessary for files built by meta URL plugin to be accessible.
68-
await context.serve({ servedir: 'dist', port: 8020 });
70+
await context.serve({ servedir: 'dist', port: Number(process.env.PORT ?? 8020) });
6971
} else {
7072
console.error(`Usage: ${process.argv0} [build|watch|serve|minify]`);
7173
}

0 commit comments

Comments
 (0)