# Remove Console Example

This example shows how to use the Next.js [removeConsole](https://nextjs.org/docs/architecture/nextjs-compiler#remove-console) config option to remove all `console.*` calls except `console.error`, or suppress all logs.

## Deploy your own

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/remove-console&project-name=remove-console&repository-name=remove-console)

## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```bash
npx create-next-app --example remove-console remove-console-app
```

```bash
yarn create next-app --example remove-console remove-console-app
```

```bash
pnpm create next-app --example remove-console remove-console-app
```

Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
