An open API service indexing awesome lists of open source software.

https://github.com/zachhandley/astrojs-remove-console-log

A first attempt at a very simple integration to remove console.log's from the built version of Astro projects
https://github.com/zachhandley/astrojs-remove-console-log

Last synced: 7 months ago
JSON representation

A first attempt at a very simple integration to remove console.log's from the built version of Astro projects

Awesome Lists containing this project

README

          

# Astro Console Cleaner

An Astro integration that removes `console.log`, `console.warn`, and `console.error` statements from your code during the build process.

## Installation

```sh
npm install astro-console-cleaner
```

## Usage

Add the integration to your `astro.config.mjs` file:

```javascript
import { defineConfig } from 'astro/config';
import astroConsoleCleaner from 'astro-console-cleaner';

export default defineConfig({
integrations: [astroConsoleCleaner()],
});
```

This integration will remove all `console.log`, `console.warn`, and `console.error` statements from your code during the build process. It will not affect your development environment.

## License

MIT