-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
37 lines (34 loc) · 941 Bytes
/
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
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import viteSentry from "vite-plugin-sentry"
const path = require("path");
require("dotenv").config({ path: path.resolve(__dirname, ".env.local") });
const viteSentryConfig = {
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "rachels-trinket-factory",
project: "vue-school-v2",
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}"`,
}
});