Skip to content

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

License

Notifications You must be signed in to change notification settings

ZachHandley/astrojs-remove-console-log

Repository files navigation

Astro Console Cleaner

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

Installation

npm install astro-console-cleaner

Usage

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

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published