build(custom): 环境变量调整

This commit is contained in:
2023-11-21 19:12:44 +08:00
parent f5aa29757e
commit b229880459
3 changed files with 14 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import { getToken, isNullOrWhitespace } from '@/utils'
import { useUserStore, usePermissionStore } from '@/store'
import * as Sentry from '@sentry/vue'
const isHash = true
const isHash = false
export const router = createRouter({
history: isHash ? createWebHashHistory('/') : createWebHistory('/'),
routes: basicRoutes,
@@ -15,7 +15,7 @@ export const router = createRouter({
export async function setupRouter(app) {
await addDynamicRoutes()
setupRouterGuard(router)
if (import.meta.env.VITE_SENTRY) {
if (import.meta.env.VITE_SENTRY === 'true') {
Sentry.init({
app,
dsn: 'https://aa4308fc56a9d107786b8dbcd2ae56e8@w.huakk.top/13',