An Astro integration that removes console.log, console.warn, and console.error statements from your code during the build process.
npm install astro-console-cleanerAdd 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.
MIT