-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
40 lines (37 loc) · 1.02 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
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import viteSentry from 'vite-plugin-sentry'
// Make process env available before Vite initiate
const path = require("path");
require("dotenv").config({
path: path.resolve(__dirname, ".env.local")
});
const viteSentryConfig = {
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "perso-5q",
project: "sentry-vue-school",
release: `${process.env.npm_package_name}@${process.env.npm_package_version}`,
setCommits: {
auto: true,
},
sourceMaps: {
include: ['./dist/assets'],
ignore: ["node_modules"],
urlPrefix: "~/assets"
}
}
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
plugins: [vue(), viteSentry(viteSentryConfig)],
build: {
sourcemap: 'hidden'
},
define: {
__SENTRY_RELEASE__: `"${process.env.npm_package_name}@${process.env.npm_package_version}"`
}
});