Home > @lynx-js/rspeedy > Performance > removeConsole

Performance.removeConsole property

Whether to remove console.[methodName] in production build.

Signature:

removeConsole?: boolean | ConsoleType[] | undefined;

Example 1

  • Remove all console methods
import { defineConfig } from '@lynx-js/rspeedy'

export default defineConfig({
  performance: {
    removeConsole: true,
  },
})

Example 2

  • Remove specific console methods
import { defineConfig } from '@lynx-js/rspeedy'

export default defineConfig({
  performance: {
    removeConsole: ['log', 'warn']
  },
})
除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。