mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
Note: had to manually resolve conflicts on this one. This will be used to upload source maps in configured environments. Docs: https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/vite/ page](https://www.notion.so/PR-6394-ci-add-sentryVitePlugin-29c6d73d365081239f48f2fd261736d5) by [Unito](https://www.unito.io) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6463-rh-test-backport-ci-add-sentryVitePlugin-6394-29c6d73d365081d2b7cdce59a2c5529d) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { sentryVitePlugin } from '@sentry/vite-plugin'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import dotenv from 'dotenv'
|
||||
@@ -226,7 +227,28 @@ export default defineConfig({
|
||||
deep: true,
|
||||
extensions: ['vue'],
|
||||
directoryAsNamespace: true
|
||||
})
|
||||
}),
|
||||
|
||||
// Sentry sourcemap upload plugin
|
||||
// Only runs during cloud production builds when all Sentry env vars are present
|
||||
// Requires: SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT env vars
|
||||
...(DISTRIBUTION === 'cloud' &&
|
||||
process.env.SENTRY_AUTH_TOKEN &&
|
||||
process.env.SENTRY_ORG &&
|
||||
process.env.SENTRY_PROJECT &&
|
||||
!IS_DEV
|
||||
? [
|
||||
sentryVitePlugin({
|
||||
org: process.env.SENTRY_ORG,
|
||||
project: process.env.SENTRY_PROJECT,
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
sourcemaps: {
|
||||
// Delete source maps after upload to prevent public access
|
||||
filesToDeleteAfterUpload: ['**/*.map']
|
||||
}
|
||||
})
|
||||
]
|
||||
: [])
|
||||
],
|
||||
|
||||
build: {
|
||||
|
||||
Reference in New Issue
Block a user