mirror of
https://github.com/joinmarket-webui/jam.git
synced 2026-08-13 12:33:26 +02:00
chore(build): remove console.debug from prod build (#1401)
This commit is contained in:
parent
51a23b4c5a
commit
c70a8892a6
2 changed files with 24 additions and 0 deletions
12
src/main.tsx
12
src/main.tsx
|
|
@ -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 />
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue