forked from matrix-org/thirdroom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
39 lines (37 loc) · 1.02 KB
/
vite.config.ts
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
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import postcssPresetEnv from "postcss-preset-env";
import crossOriginIsolation from "vite-plugin-cross-origin-isolation";
import pluginRewriteAll from "vite-plugin-rewrite-all";
import testnetServerPlugin from "./src/testnet";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [pluginRewriteAll(), react(), crossOriginIsolation(), testnetServerPlugin()],
resolve: {
dedupe: ["three", "bitecs"],
},
css: {
postcss: {
plugins: [
postcssPresetEnv({
stage: 1,
browsers: "last 2 versions",
autoprefixer: true,
}) as any, // postcss-preset-env type definitions are out of date
],
},
},
define: {
"import.meta.vitest": "undefined",
},
test: {
globals: true,
environment: "jsdom",
setupFiles: "./test/setup.ts",
includeSource: ["src/**/*.{ts,tsx}"],
coverage: {
all: true,
include: ["src/**/*.{ts,tsx}"],
},
},
});