설정 변경

This commit is contained in:
focp212@naver.com
2025-11-10 10:39:50 +09:00
parent 7a312dacc1
commit 24d0b38e5e
6 changed files with 7 additions and 91 deletions

View File

@@ -1,7 +1,6 @@
VITE_APP_ENV=development
# VITE_APP_AUTH_PROXY_HOST='http://3.35.79.250:8090'
# VITE_APP_API_PROXY_HOST='http://3.35.79.250:8080'
VITE_APP_AUTH_PROXY_HOST='http://auth.nicepay.co.kr'
VITE_APP_API_PROXY_HOST='http://rest.nicepay.co.kr'
VITE_APP_AUTH_PROXY_HOST='http://3.35.79.250:8090'
VITE_APP_API_PROXY_HOST='http://3.35.79.250:8080'
#VITE_APP_AUTH_PROXY_HOST='http://auth.nicepay.co.kr'
#VITE_APP_API_PROXY_HOST='http://rest.nicepay.co.kr'
GENERATE_SOURCEMAP=false
SENTRY_AUTH_TOKEN=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

View File

@@ -6,4 +6,3 @@ VITE_APP_ENV=production
VITE_APP_AUTH_PROXY_HOST='https://auth.nicepay.co.kr'
VITE_APP_API_PROXY_HOST='https://rest.nicepay.co.kr'
GENERATE_SOURCEMAP=false
SENTRY_AUTH_TOKEN=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

View File

@@ -3,13 +3,11 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import { App } from './app';
import { initAxios } from '@/shared/configs/axios';
import { initSentry } from '@/shared/configs/sentry';
import { AppProvider } from './providers/app-provider';
// import appBridge from '@/shared/lib/appBridge';
const initApp = async () => {
initAxios();
initSentry();
// appBridge.sendMessage('login')
};

View File

@@ -1,61 +1,20 @@
/* eslint-disable react-refresh/only-export-components */
import * as Sentry from '@sentry/react';
import { OverlayProvider } from 'overlay-kit';
import React, { lazy } from 'react';
import { lazy } from 'react';
import {
createRoutesFromChildren,
matchRoutes,
Navigate,
Route,
Routes,
useLocation,
useNavigationType,
Routes
} from 'react-router';
import { createBrowserRouter } from 'react-router-dom';
import { AppChildren } from '@/app/app-children';
import { GlobalAPIErrorBoundary } from '@/widgets/error-boundaries';
import { NotFoundError } from '@/widgets/fallbacks';
import { ProtectedRoute } from '@/widgets/protected-route';
import { PullToRefreshRoute } from '@/widgets/pull-to-refresh/pull-to-refresh-route';
import { SubLayout } from '@/widgets/sub-layout';
import { IS_PROD } from '@/shared/constants/environment';
import { ROUTE_NAMES } from '@/shared/constants/route-names';
import { toCamelCase } from '@/shared/lib/to-camel-case';
export const initSentry = () => {
if (IS_PROD) {
Sentry.init({
environment: import.meta.env.VITE_APP_ENV,
dsn: 'https://ddd8755ce025f753e8521af5b1034a93@o4507569039867904.ingest.us.sentry.io/4507569041244160',
integrations: [
Sentry.browserTracingIntegration(),
Sentry.browserProfilingIntegration(),
Sentry.replayIntegration(),
Sentry.reactRouterV6BrowserTracingIntegration({
useEffect: React.useEffect,
useLocation,
useNavigationType,
createRoutesFromChildren,
matchRoutes,
}),
],
normalizeDepth: 6,
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: [
'http://3.35.79.250:8090'
],
// Session Replay
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
profilesSampleRate: 1.0,
});
}
};
const sentryCreateBrowserRouter = Sentry.wrapCreateBrowserRouterV6(createBrowserRouter);
const modules = import.meta.glob('~/pages/**/*.tsx');

View File

@@ -1,7 +1,5 @@
import baseConfig from './vite.config.mjs';
import { defineConfig } from 'vite';
import { sentryVitePlugin } from '@sentry/vite-plugin';
const rollupExternalModules = {
tests: (id) => /.*\.test\.(ts|tsx)$/.test(id) || /.*\.spec\.(ts|tsx)$/.test(id),
};
@@ -29,23 +27,6 @@ export default ({ mode }) => {
},
plugins: [
...base.plugins,
sentryVitePlugin({
org: 'medea-cc',
project: 'javascript-react',
authToken: process.env.SENTRY_AUTH_TOKEN,
sourcemaps: {
filesToDeleteAfterUpload: '**/*.js.map',
},
bundleSizeOptimizations: {
excludeDebugStatement: true,
// Only relvant if you added `browserTracingIntegration`
excludePerformanceMonitoring: true,
// Only relevant if you added `replatIntegration`
excludeReplayIframe: true,
excludeReplayShadowDom: true,
excludeReplayWorker: true,
},
}),
],
});
};

View File

@@ -35,26 +35,6 @@ export default ({ mode }) => {
}),
];
if (mode === 'production') {
plugins.push(
sentryVitePlugin({
org: 'media-cc',
project: 'javascript-react',
authToken: process.env.SENTRY_AUTH_TOKEN,
bundleSizeOptimizations: {
excludeDebugStatements: true,
// Only relevant if you added `browserTracingIntegration`
excludePerformanceMonitoring: true,
// Only relevant if you added `replayIntegration`
excludeReplayIframe: true,
excludeReplayShadowDom: true,
excludeReplayWorker: true,
},
disable: false,
}),
);
}
return defineConfig({
build: {
outDir: 'build',