-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
49 lines (46 loc) · 1.37 KB
/
vite.config.js
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
import { fileURLToPath, URL } from 'node:url';
import { defineConfig, loadEnv } from "vite";
import vue from '@vitejs/plugin-vue';
import { sentryVitePlugin } from '@sentry/vite-plugin';
import { codecovVitePlugin } from "@codecov/vite-plugin";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
// Load env file based on `mode` in the current working directory.
// Set the third parameter to '' to load all env regardless of the `VITE_` prefix.
const env = loadEnv(mode, process.cwd(), "")
return {
plugins: [
vue(),
sentryVitePlugin({
org: "sentry",
project: "gibpotato-frontend",
include: './webroot/assets/**',
authToken: env.SENTRY_AUTH_TOKEN,
dryRun: env.SENTRY_AUTH_TOKEN,
release: env.RELEASE,
telemetry: false
}),
codecovVitePlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: "gib-potato",
uploadToken: process.env.CODECOV_TOKEN,
}),
],
build: {
sourcemap: true,
emptyOutDir: false,
outDir: './webroot/',
manifest: true,
minify: 'esbuild',
rollupOptions: {
input: './frontend/src/main.js',
},
},
envDir: './frontend/config',
resolve: {
alias: {
'@': fileURLToPath(new URL('./frontend/src', import.meta.url)),
},
},
}
});