forked from karthilxg/chess-trainer-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
43 lines (39 loc) · 1.04 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
40
41
42
43
import solid from "solid-start/vite";
import { defineConfig } from "vite";
import devtools from "solid-devtools/vite";
import UnoCSS from "unocss/vite";
import { fileURLToPath } from "node:url";
import { unoConfig } from "./src/utils/uno";
import { sentryVitePlugin } from "@sentry/vite-plugin";
const IS_STORYBOOK = !!process.env.IS_STORYBOOK;
export default defineConfig({
define: {
"process.env": JSON.stringify({}),
},
resolve: {
alias: {
"~": fileURLToPath(new URL("./src", import.meta.url)),
},
},
plugins: [
[
...(process.env.VITEST
? []
: [
devtools({
/* additional options */
autoname: true, // e.g. enable autoname
}),
UnoCSS(unoConfig),
]),
],
[...(IS_STORYBOOK || process.env.VITEST ? [] : [solid({})])],
sentryVitePlugin({
org: "marcus-lr",
project: "chessmadra",
// Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/
// and need `project:releases` and `org:read` scopes
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
],
});