feat: get wasm working from libparakeet

This commit is contained in:
鲁树人
2023-05-10 22:01:32 +01:00
parent 2c56c22c74
commit fc2238ff39
5 changed files with 206 additions and 2 deletions

View File

@@ -1,10 +1,16 @@
import path from 'path';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import wasm from 'vite-plugin-wasm';
import topLevelAwait from 'vite-plugin-top-level-await';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: './',
optimizeDeps: {
exclude: ['@jixun/libparakeet'],
},
plugins: [react(), wasm(), topLevelAwait()],
resolve: {
alias: {
'~': path.resolve(__dirname, 'src'),