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
- Host: GitHub
- URL: https://github.com/zachhandley/astrojs-remove-console-log
- Owner: ZachHandley
- License: mit
- Created: 2024-08-12T20:38:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-27T17:21:45.000Z (about 1 year ago)
- Last Synced: 2025-03-09T09:32:49.336Z (7 months ago)
- Language: TypeScript
- Size: 224 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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