Socket
Socket
Sign inDemoInstall

vite-plugin-remove-console

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-remove-console

A vite plugin that deletes console.log in the production environment


Version published
Weekly downloads
9K
decreased by-14.8%
Maintainers
1
Weekly downloads
 
Created
Source

vite-plugin-remove-console

Delete the vite plugin of console.log in the production environment

NPM version NPM Downloads

English | 简体中文

🚀 Features

  • High precision, zero intrusion: Accurately and complete remove console.log in the code, currently supports the removal of file formats .js, .ts, .jsx, .tsx, .vue, .svelte
  • 🧪 Perfect example: Currently we have added preact-js, preact-ts, react-js, react-ts, svelte-js, svelte-ts, vue-js, vue-ts examples to the playgrounds folder, zero usage cost
  • 🦾 Configurable: Support passing external, which means that some files do not delete console.log, for example: removeConsole({ external: ["src/assets/iconfont/iconfont.js", ...] })

📦 install

npm install vite-plugin-remove-console -D
or
pnpm add vite-plugin-remove-console -D

🦄 Usage

  • vite.config.ts
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import removeConsole from 'vite-plugin-remove-console';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    removeConsole()
  ]
});

Refer to more examples

License

MIT © xiaoxian521-2022

Keywords

FAQs

Package last updated on 23 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc