Skip to content

Commit

Permalink
πŸš‘ fix: ν”„λ‘œλ•μ…˜ ν™˜κ²½μ—μ„œ μ†ŒμŠ€λ§΅ 확인할 수 없도둝 μˆ˜μ • (#311)
Browse files Browse the repository at this point in the history
* πŸ“¦ chore: Production용 ν™˜κ²½ λ³€μˆ˜ μ˜ˆμ‹œ 파일 μž‘μ„±

* πŸ“¦ chore: μ†ŒμŠ€λ§΅μ΄ ν”„λ‘œλ•μ…˜ ν™˜κ²½μ—μ„œ μ§€μ›Œμ§€λ„λ‘ μ„€μ •

* πŸ“¦ chore: κ΄€λ¦¬μž 앱에 Sentry ν…ŒμŠ€νŠΈμš© μž„μ‹œ λ²„νŠΌ μΆ”κ°€
  • Loading branch information
bbearcookie authored Apr 25, 2024
1 parent c89bebb commit d963300
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .env.production.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SENTRY_PROJECT= # Sentry Project
SENTRY_AUTH_TOKEN= # Sentry Auth Token
SENTRY_ORG= # Sentry Organization
7 changes: 7 additions & 0 deletions src/AdminApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ import 'react-toastify/dist/ReactToastify.css';
const AdminApp = () => {
return (
<Background imageUrl={BackgroundImg}>
<button
onClick={() => {
throw new Error('Sentry ν…ŒμŠ€νŠΈ');
}}
>
Sentry μˆ˜μ§‘ ν…ŒμŠ€νŠΈ
</button>
<UnknownErrorBoundary FallbackComponent={RootUnknownFallback}>
<ApiErrorBoundary FallbackComponent={RootApiFallback}>
<Outlet />
Expand Down
54 changes: 31 additions & 23 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
/// <reference types="vitest" />
import { sentryVitePlugin } from '@sentry/vite-plugin';
import { defineConfig } from 'vite';
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react({
jsxImportSource: '@emotion/react',
}),
sentryVitePlugin({
org: 'oceanletter-y1',
project: 'oceanletter-react',
}),
],
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');

resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
return {
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
},

test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/setupTests.ts'],
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/setupTests.ts'],
},

build: {
sourcemap: true,
},

build: {
sourcemap: true,
},
plugins: [
react({
jsxImportSource: '@emotion/react',
}),
sentryVitePlugin({
org: env.SENTRY_ORG,
project: env.SENTRY_PROJECT,
authToken: env.SENTRY_AUTH_TOKEN,
sourcemaps: {
filesToDeleteAfterUpload: ['**/*.js.map'],
},
}),
],
};
});

0 comments on commit d963300

Please sign in to comment.