-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π¦ chore: μμ€λ§΅μ΄ νλ‘λμ
νκ²½μμ μ§μμ§λλ‘ μ€μ
- Loading branch information
1 parent
7dc27d7
commit 2a54487
Showing
1 changed file
with
31 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'], | ||
}, | ||
}), | ||
], | ||
}; | ||
}); |