Skip to content

Commit 4bd9981

Browse files
authored
Merge pull request #2771 from benderl/koala
Koala: remove console logs
2 parents 0070766 + 1869504 commit 4bd9981

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

packages/modules/web_themes/koala/source/quasar.config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { defineConfig } from '#q-app/wrappers';
77

8-
export default defineConfig((/* ctx */) => {
8+
export default defineConfig((ctx) => {
99
return {
1010
// https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
1111
// preFetch: true,
@@ -56,6 +56,16 @@ export default defineConfig((/* ctx */) => {
5656
distDir: '../web/',
5757

5858
// extendViteConf (viteConf) {},
59+
extendViteConf(viteConf) {
60+
if (ctx.prod === true) {
61+
// drop console statements in production build
62+
viteConf.esbuild = {
63+
...viteConf.esbuild,
64+
drop: ['debugger'],
65+
pure: ['console.log', 'console.info', 'console.debug', 'console.table'],
66+
};
67+
}
68+
},
5969
// viteVuePluginOptions: {},
6070

6171
vitePlugins: [

0 commit comments

Comments
 (0)