wgpu + wasm + worker (#8)

initial setup
This commit is contained in:
Heaust Azure
2025-08-04 22:23:37 +05:30
committed by GitHub
parent 9d2bf4055d
commit ba2d1c064b
33 changed files with 4207 additions and 963 deletions
+30
View File
@@ -0,0 +1,30 @@
import { defineConfig } from "vite";
import wasm from "vite-plugin-wasm";
export default defineConfig({
build: {
rollupOptions: {
input: {
app: "static/index.html",
},
},
// Relative to 'root'.
outDir: "../dist",
},
// For getting out of index.html from dist/static directory.
root: "static",
worker: {
format: "es",
},
plugins: [
// Makes us be able to use top level await for wasm.
// Otherwise, we can restrict build.target to 'es2022', which allows top level await.
wasm(),
],
server: {
port: 8080,
},
preview: {
port: 8080,
},
});