Skip to content

Commit

Permalink
feat(frontend): Upload JS soruce maps
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Jul 26, 2023
1 parent a72406e commit 088e1c2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 36 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export SENTRY_BACKEND_DSN="__SENTRY_BACKEND_DSN__"
export SENTRY_FRONTEND_DSN="__SENTRY_BACKEND_DSN__"
export SENTRY_POTAL_DSN="__SENTRY_POTAL_DSN__"
export SENTRY_MONITOR_ID="__SENTRY_MONITOR_ID__"
export SENTRY_AUTH_TOKEN="__SENTRY_AUTH_TOKEN__"

export POTAL_TOKEN="__POTAL_TOKEN__"
export POTAL_URL="__POTAL_URL__"
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ services:
- SENTRY_BACKEND_DSN
- SENTRY_FRONTEND_DSN
- SENTRY_MONITOR_ID
- SENTRY_AUTH_TOKEN
- POTAL_TOKEN
- POTATO_CHANNEL
- POTATO_SLACK_USER_ID
Expand Down
69 changes: 33 additions & 36 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,43 @@
// @ts-check
import { fileURLToPath, URL } from 'node:url';

import { defineConfig } from 'vite';
import { defineConfig, loadEnv } from "vite";
import vue from '@vitejs/plugin-vue';
import { sentryVitePlugin } from '@sentry/vite-plugin';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
// sentryVitePlugin({
// include: [], // we're using debug ID upload instead (see _experiments.debugIdUpload)
// org: process.env.SENTRY_ORG,
// project: process.env.SENTRY_PROJECT,
// authToken: process.env.SENTRY_AUTH_TOKEN,
// dryRun: !process.env.SENTRY_AUTH_TOKEN,
// setCommits: {
// auto: true,
// ignoreEmpty: true,
// },
// _experiments: {
// injectBuildInformation: true,
// debugIdUpload: {
// include: './webroot/assets/**',
// },
// },
// }),
],
build: {
sourcemap: true,
emptyOutDir: false,
outDir: './webroot/',
manifest: true,
minify: 'esbuild',
rollupOptions: {
input: './frontend/src/main.js',
export default defineConfig(({ mode }) => {
// Load env file based on `mode` in the current working directory.
// Set the third parameter to '' to load all env regardless of the `VITE_` prefix.
const env = loadEnv(mode, process.cwd(), "")

return {
plugins: [
vue(),
sentryVitePlugin({
org: "sentry",
project: "gibpotato-frontend",
include: './webroot/assets/**',
authToken: env.SENTRY_AUTH_TOKEN,
dryRun: env.SENTRY_AUTH_TOKEN,
release: env.RELEASE,
}),
],
build: {
sourcemap: true,
emptyOutDir: false,
outDir: './webroot/',
manifest: true,
minify: 'esbuild',
rollupOptions: {
input: './frontend/src/main.js',
},
},
},
envDir: './frontend/config',
resolve: {
alias: {
'@': fileURLToPath(new URL('./frontend/src', import.meta.url)),
envDir: './frontend/config',
resolve: {
alias: {
'@': fileURLToPath(new URL('./frontend/src', import.meta.url)),
},
},
},
}
});

0 comments on commit 088e1c2

Please sign in to comment.