Skip to content

Instantly share code, notes, and snippets.

@sjdonado
Last active May 8, 2023 19:03
Show Gist options
  • Save sjdonado/2715229d6e68885507cf45b4f9044230 to your computer and use it in GitHub Desktop.
Save sjdonado/2715229d6e68885507cf45b4f9044230 to your computer and use it in GitHub Desktop.
Tower of Hanoi in P5.js + WASM - Dev.to
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
+ import wasm from 'vite-plugin-wasm';
+ import topLevelAwait from 'vite-plugin-top-level-await';
import path from 'path';
export default defineConfig({
plugins: [
solidPlugin(),
+ wasm(),
+ topLevelAwait(),
],
server: {
port: 3000,
},
build: {
target: 'esnext',
},
resolve: {
alias: {
'@src': path.resolve(__dirname, './src'),
+ '@wasm': path.resolve(__dirname, './wasm'),
},
},
+ worker: {
+ plugins: [
+ wasm(),
+ topLevelAwait(),
+ ],
+ },
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment