-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.js
More file actions
58 lines (55 loc) 路 1.67 KB
/
Copy pathvite.config.js
File metadata and controls
58 lines (55 loc) 路 1.67 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
import { fileURLToPath, URL } from 'node:url';
import { defineConfig, loadEnv } from 'vite-plus';
import vue from '@vitejs/plugin-vue';
import tailwindcss from '@tailwindcss/vite';
import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';
// 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 {
lint: {
ignorePatterns: ['webroot/**'],
},
fmt: {
singleQuote: true,
tabWidth: 4,
},
plugins: [
vue(),
tailwindcss(),
sentryVitePlugin({
org: 'sentry',
project: 'gibpotato-frontend',
authToken: env.SENTRY_AUTH_TOKEN,
disable: !env.SENTRY_AUTH_TOKEN,
release: {
name: env.RELEASE,
},
sourcemaps: {
assets: './webroot/assets/**',
},
telemetry: false,
}),
],
build: {
sourcemap: true,
emptyOutDir: false,
outDir: './webroot/',
manifest: true,
rolldownOptions: {
input: './frontend/src/main.js',
},
},
server: {
cors: true,
},
envDir: './frontend/config',
resolve: {
alias: {
'@': fileURLToPath(new URL('./frontend/src', import.meta.url)),
},
},
};
});