This commit is contained in:
25
e2e/wasm/vitest.config.local.ts
generated
Normal file
25
e2e/wasm/vitest.config.local.ts
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
// Local vitest configuration to handle WASM imports
|
||||
import { defineConfig, mergeConfig } from "vitest/config";
|
||||
import baseConfig from "./vitest.config";
|
||||
|
||||
export default mergeConfig(
|
||||
baseConfig,
|
||||
defineConfig({
|
||||
test: {
|
||||
// Use the default Node.js test environment with WASM support
|
||||
env: {
|
||||
// Mock out WASI imports
|
||||
env: JSON.stringify({}),
|
||||
},
|
||||
// Limit parallelism to reduce memory spikes from V8 WASM isolates
|
||||
fileParallelism: false,
|
||||
isolate: false,
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
env: new URL("./wasi-polyfill.js", import.meta.url).pathname,
|
||||
wasi_snapshot_preview1: new URL("./wasi-polyfill.js", import.meta.url).pathname,
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
Reference in New Issue
Block a user