Last active
May 8, 2023 19:03
-
-
Save sjdonado/2715229d6e68885507cf45b4f9044230 to your computer and use it in GitHub Desktop.
Tower of Hanoi in P5.js + WASM - Dev.to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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