-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
40 lines (38 loc) · 1000 Bytes
/
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
/* eslint-disable turbo/no-undeclared-env-vars */
import { defineConfig } from "vite";
import path from "path";
import svgr from "vite-plugin-svgr";
import monacoEditorPlugin from "vite-plugin-monaco-editor";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
svgr({ exportAsDefault: true }),
monacoEditorPlugin({}),
// sentryVitePlugin({
// authToken: process.env.SENTRY_AUTH_TOKEN,
// org: "mao-wa",
// project: "b-react",
// }),
].filter(Boolean) as any,
define: {
"process.env.UNSPLASH_CLIENT_ID": JSON.stringify(
process.env.UNSPLASH_CLIENT_ID
),
"process.env.CLIENT_ID": JSON.stringify(process.env.CLIENT_ID),
},
build: {
emptyOutDir: true,
minify: false,
manifest: false,
sourcemap: false,
},
resolve: {
alias: {
"mjml-browser": path.resolve("./node_modules/mjml-browser"),
"@": path.resolve("src"),
},
},
optimizeDeps: {
needsInterop: ["velocityjs"],
},
});