For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/api/rspeedy.performance.removeconsole.md.
这是开发预览网站。请访问正式文档 lynxjs.org

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

Performance.removeConsole property

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

Signature:

removeConsole?: boolean | ConsoleType[] | undefined;

Default Value

false

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']
  },
})