CapacitorConfig loggingBehavior not working

I am using Capacitor without Ionic on a React project.

My capacitor.config.ts file is set as below :

import { CapacitorConfig } from '@capacitor/cli';

let config: CapacitorConfig;

const baseConfig: CapacitorConfig = {
  appId: 'com.myAPp',
  appName: 'myApp',
  webDir: 'build',
  bundledWebRuntime: false,

switch (process.env.NODE_ENV) {
  case 'production':
    config = {
      loggingBehavior: 'none',
    config = {
      "server": {
        "url": "",
        "cleartext": true

export default config;

I build my application by running react-scripts build then NODE_ENV=production npx cap run ios.

Even if the loggingBehavior is set to “none” which according to the documentation should not produce any console.error/console.debug, i’m still able to see logs on the console.

          onClick={() => {
            console.debug("Hello world");