mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
[ci] drop console statements (except warn and error) when building app (#6123)
## Summary Marks all the console methods besides `warn` and `error` as pure functions so they can be dropped during DCE in build pipeline. It's simpler to use `drop` but that would remove errors/warnings. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6123-ci-drop-console-statements-except-warn-and-error-when-building-app-2906d73d365081f28303c0d784352b12) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -196,7 +196,29 @@ export default defineConfig({
|
||||
minifyIdentifiers: SHOULD_MINIFY,
|
||||
keepNames: true,
|
||||
minifySyntax: SHOULD_MINIFY,
|
||||
minifyWhitespace: SHOULD_MINIFY
|
||||
minifyWhitespace: SHOULD_MINIFY,
|
||||
pure: SHOULD_MINIFY
|
||||
? [
|
||||
'console.log',
|
||||
'console.debug',
|
||||
'console.info',
|
||||
'console.trace',
|
||||
'console.dir',
|
||||
'console.dirxml',
|
||||
'console.group',
|
||||
'console.groupCollapsed',
|
||||
'console.groupEnd',
|
||||
'console.table',
|
||||
'console.time',
|
||||
'console.timeEnd',
|
||||
'console.timeLog',
|
||||
'console.count',
|
||||
'console.countReset',
|
||||
'console.profile',
|
||||
'console.profileEnd',
|
||||
'console.clear'
|
||||
]
|
||||
: []
|
||||
},
|
||||
|
||||
test: {
|
||||
|
||||
Reference in New Issue
Block a user