chore(build): remove console.debug from prod build (#1401)

This commit is contained in:
Thebora Kompanioni 2026-08-02 21:30:28 +02:00 committed by GitHub
parent 51a23b4c5a
commit c70a8892a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

View file

@ -2,8 +2,20 @@ import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from '@/App.tsx'
import '@/i18n/config'
import { JAM_REPO_URL } from './constants/jam'
import './index.css'
console.debug(
`%c/${'*'.repeat(42)}
* Thanks for testing! Please report anything that looks off.
* Found a bug? Open an issue at ${JAM_REPO_URL}/issues/new?labels=bug&template=bug_report.md
*
* This message should be dropped from preview/prod builds.
* Use the above link and open a bug report if you see this message outside development builds.
${'*'.repeat(42)}/`,
'color:#e2b86a;font-size:14px;',
)
createRoot(document.querySelector('#root')!).render(
<StrictMode>
<App />

View file

@ -78,6 +78,18 @@ export default defineConfig((config): UserConfig => {
'@': path.resolve(import.meta.dirname, './src'),
},
},
build: {
rolldownOptions: {
output: {
minify: {
compress: {
dropConsole: buildOrPreview,
dropDebugger: buildOrPreview,
},
},
},
},
},
server: {
...server,
open: true,