mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 22:30:41 +08:00
This prevents polyfills being installed that break node-only libraries. Also silences warnings when a vite server is not running while running the tests.
26 lines
602 B
TypeScript
26 lines
602 B
TypeScript
import nodeConfig from "config";
|
|
import path from "node:path";
|
|
import virtual from "vite-plugin-virtual";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
virtual({
|
|
"virtual:config": nodeConfig.util.toObject(),
|
|
}),
|
|
],
|
|
test: {
|
|
environment: "node",
|
|
include: ["httpd-client/tests/*.test.ts"],
|
|
reporters: "verbose",
|
|
globalSetup: "./tests/support/globalSetup",
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@tests": path.resolve("./tests"),
|
|
"@app": path.resolve("./src"),
|
|
"@httpd-client": path.resolve("./httpd-client"),
|
|
},
|
|
},
|
|
});
|