설정 변경
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
VITE_APP_ENV=development
|
VITE_APP_ENV=development
|
||||||
# VITE_APP_AUTH_PROXY_HOST='http://3.35.79.250:8090'
|
VITE_APP_AUTH_PROXY_HOST='http://3.35.79.250:8090'
|
||||||
# VITE_APP_API_PROXY_HOST='http://3.35.79.250:8080'
|
VITE_APP_API_PROXY_HOST='http://3.35.79.250:8080'
|
||||||
VITE_APP_AUTH_PROXY_HOST='http://auth.nicepay.co.kr'
|
#VITE_APP_AUTH_PROXY_HOST='http://auth.nicepay.co.kr'
|
||||||
VITE_APP_API_PROXY_HOST='http://rest.nicepay.co.kr'
|
#VITE_APP_API_PROXY_HOST='http://rest.nicepay.co.kr'
|
||||||
GENERATE_SOURCEMAP=false
|
GENERATE_SOURCEMAP=false
|
||||||
SENTRY_AUTH_TOKEN=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
|
|
||||||
@@ -6,4 +6,3 @@ VITE_APP_ENV=production
|
|||||||
VITE_APP_AUTH_PROXY_HOST='https://auth.nicepay.co.kr'
|
VITE_APP_AUTH_PROXY_HOST='https://auth.nicepay.co.kr'
|
||||||
VITE_APP_API_PROXY_HOST='https://rest.nicepay.co.kr'
|
VITE_APP_API_PROXY_HOST='https://rest.nicepay.co.kr'
|
||||||
GENERATE_SOURCEMAP=false
|
GENERATE_SOURCEMAP=false
|
||||||
SENTRY_AUTH_TOKEN=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
|
|
||||||
@@ -3,13 +3,11 @@ import React from 'react';
|
|||||||
import ReactDOM from 'react-dom/client';
|
import ReactDOM from 'react-dom/client';
|
||||||
import { App } from './app';
|
import { App } from './app';
|
||||||
import { initAxios } from '@/shared/configs/axios';
|
import { initAxios } from '@/shared/configs/axios';
|
||||||
import { initSentry } from '@/shared/configs/sentry';
|
|
||||||
import { AppProvider } from './providers/app-provider';
|
import { AppProvider } from './providers/app-provider';
|
||||||
// import appBridge from '@/shared/lib/appBridge';
|
// import appBridge from '@/shared/lib/appBridge';
|
||||||
|
|
||||||
const initApp = async () => {
|
const initApp = async () => {
|
||||||
initAxios();
|
initAxios();
|
||||||
initSentry();
|
|
||||||
// appBridge.sendMessage('login')
|
// appBridge.sendMessage('login')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,61 +1,20 @@
|
|||||||
/* eslint-disable react-refresh/only-export-components */
|
|
||||||
import * as Sentry from '@sentry/react';
|
import * as Sentry from '@sentry/react';
|
||||||
import { OverlayProvider } from 'overlay-kit';
|
import { OverlayProvider } from 'overlay-kit';
|
||||||
import React, { lazy } from 'react';
|
import { lazy } from 'react';
|
||||||
import {
|
import {
|
||||||
createRoutesFromChildren,
|
|
||||||
matchRoutes,
|
|
||||||
Navigate,
|
Navigate,
|
||||||
Route,
|
Route,
|
||||||
Routes,
|
Routes
|
||||||
useLocation,
|
|
||||||
useNavigationType,
|
|
||||||
} from 'react-router';
|
} from 'react-router';
|
||||||
import { createBrowserRouter } from 'react-router-dom';
|
import { createBrowserRouter } from 'react-router-dom';
|
||||||
|
|
||||||
import { AppChildren } from '@/app/app-children';
|
import { AppChildren } from '@/app/app-children';
|
||||||
import { GlobalAPIErrorBoundary } from '@/widgets/error-boundaries';
|
import { GlobalAPIErrorBoundary } from '@/widgets/error-boundaries';
|
||||||
import { NotFoundError } from '@/widgets/fallbacks';
|
import { NotFoundError } from '@/widgets/fallbacks';
|
||||||
import { ProtectedRoute } from '@/widgets/protected-route';
|
import { ProtectedRoute } from '@/widgets/protected-route';
|
||||||
import { PullToRefreshRoute } from '@/widgets/pull-to-refresh/pull-to-refresh-route';
|
|
||||||
import { SubLayout } from '@/widgets/sub-layout';
|
import { SubLayout } from '@/widgets/sub-layout';
|
||||||
import { IS_PROD } from '@/shared/constants/environment';
|
|
||||||
import { ROUTE_NAMES } from '@/shared/constants/route-names';
|
import { ROUTE_NAMES } from '@/shared/constants/route-names';
|
||||||
import { toCamelCase } from '@/shared/lib/to-camel-case';
|
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 sentryCreateBrowserRouter = Sentry.wrapCreateBrowserRouterV6(createBrowserRouter);
|
||||||
|
|
||||||
const modules = import.meta.glob('~/pages/**/*.tsx');
|
const modules = import.meta.glob('~/pages/**/*.tsx');
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import baseConfig from './vite.config.mjs';
|
import baseConfig from './vite.config.mjs';
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
|
||||||
|
|
||||||
const rollupExternalModules = {
|
const rollupExternalModules = {
|
||||||
tests: (id) => /.*\.test\.(ts|tsx)$/.test(id) || /.*\.spec\.(ts|tsx)$/.test(id),
|
tests: (id) => /.*\.test\.(ts|tsx)$/.test(id) || /.*\.spec\.(ts|tsx)$/.test(id),
|
||||||
};
|
};
|
||||||
@@ -29,23 +27,6 @@ export default ({ mode }) => {
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
...base.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,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -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({
|
return defineConfig({
|
||||||
build: {
|
build: {
|
||||||
outDir: 'build',
|
outDir: 'build',
|
||||||
|
|||||||
Reference in New Issue
Block a user