forked from Prompt-Hash-Stellar/prompt-hash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mjs
More file actions
63 lines (56 loc) · 1.57 KB
/
Copy pathvitest.config.mjs
File metadata and controls
63 lines (56 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import path from "path";
import { fileURLToPath } from "url";
import { createRequire } from "module";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const require = createRequire(import.meta.url);
export default defineConfig({
plugins: [react(), nodePolyfills({ include: ["buffer"] })],
optimizeDeps: {
exclude: ["@creit.tech/stellar-wallets-kit"],
include: ["@stellar/stellar-sdk", "buffer"],
},
css: {
modules: {
classNameStrategy: "non-scoped",
},
},
build: {
commonjsOptions: {
include: [/@creit.tech\/stellar-wallets-kit/, /node_modules/],
transformMixedEsModules: true,
},
},
test: {
environment: "jsdom",
globals: true,
setupFiles: "./src/test/setup.ts",
testTimeout: 15000,
exclude: [
"**/node_modules/**",
"**/dist/**",
"**/cypress/**",
"**/.{idea,git,cache,output,temp}/**",
"**/{karma,rollup,webpack,vite,vitest}.config.*",
"**/server/**",
"src/test/similarityDetection.test.ts",
"src/test/auditTrail.test.ts",
"src/test/health.test.ts",
"src/test/simulation.test.ts",
],
server: {
deps: {
inline: [/@creit\.tech\/stellar-wallets-kit/, /libsodium-wrappers/],
},
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"libsodium-wrappers": require.resolve("libsodium-wrappers"),
},
},
});