Avoid adding imports with a hash in chunks, as this causes long term caching issues.
parent
f8cf7c2b69
commit
f9ca30c03c
|
@ -22,6 +22,7 @@ if (BRANCH_NAME && IS_STAGING) {
|
|||
|
||||
if (!import.meta.env.SSR && (IS_PRODUCTION || IS_STAGING)) {
|
||||
init({
|
||||
release: SENTRY_RELEASE_NAME,
|
||||
dsn: 'https://d857393f4cfb40eebc0b9b54893bab23@sentry.incubateur.net/9',
|
||||
integrations: [
|
||||
new CaptureConsole({ levels: ['error'] }),
|
||||
|
|
|
@ -52,3 +52,8 @@ declare const IS_STAGING: boolean
|
|||
* This variable is statically replaced during the build
|
||||
*/
|
||||
declare const IS_DEVELOPMENT: boolean
|
||||
|
||||
/**
|
||||
* This variable is statically replaced during the build
|
||||
*/
|
||||
declare const SENTRY_RELEASE_NAME: string
|
||||
|
|
|
@ -55,6 +55,7 @@ export default defineConfig(({ command, mode }) => ({
|
|||
IS_DEVELOPMENT: mode === 'development',
|
||||
IS_STAGING: mode === 'production' && !isProductionBranch(mode),
|
||||
IS_PRODUCTION: mode === 'production' && isProductionBranch(mode),
|
||||
SENTRY_RELEASE_NAME: JSON.stringify(sentryReleaseName(mode)),
|
||||
},
|
||||
plugins: [
|
||||
command === 'build' &&
|
||||
|
@ -109,6 +110,7 @@ export default defineConfig(({ command, mode }) => ({
|
|||
release: {
|
||||
// Use same release name as the one used in the app.
|
||||
name: sentryReleaseName(mode),
|
||||
inject: false, // Avoid adding imports with a hash in chunks, as this causes long term caching issues.
|
||||
uploadLegacySourcemaps: {
|
||||
paths: ['./dist'],
|
||||
ignore: ['./node_modules'],
|
||||
|
|
Loading…
Reference in New Issue