How to configure OXC's dropConsole in quasar.config.ts? #18498
|
How can I configure dropConsole in quasar.config.ts for OXC? |
Replies: 1 comment 1 reply
|
You can pass the OXC options through the Vite/Rolldown output configuration: // quasar.config.ts
build: {
minify: "oxc",
extendViteConf: () => ({
build: {
rolldownOptions: {
output: {
minify: {
compress: {
dropConsole: true,
},
},
},
},
},
}),
}
This keeps compression, mangling, and whitespace minification enabled; For SSR/SSG, if you want this only in the browser bundle, use the second Rolldown also has an official |
You can pass the OXC options through the Vite/Rolldown output configuration:
build.minify: "oxc"selects OXC. Fine-grained OXC minifier options are passed throughbuild.rolldownOptions.output.minify.This keeps compression, mangling, and whitespace minification enabled;
dropConsoleadditionally removes calls toconsole.*from the generated production bundle.For SSR/SSG, if you want this only in the browser bundle, use the …