-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): Upload JS soruce maps
- Loading branch information
Showing
3 changed files
with
35 additions
and
36 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
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
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,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)), | ||
}, | ||
}, | ||
}, | ||
} | ||
}); |