1.1.3 • Published 3 years ago
vite-plugin-remove-console-method-calls v1.1.3
English | 简体中文
🚀 Features
- ⚡ High precision, zero intrusion: Accurately and complete remove
console.login 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,solid-js,solid-ts,svelte-js,svelte-ts,vue-js,vue-tsexamples to the playgrounds folder, zero usage cost - 🦾 Configurable: Support passing
external, which means that some files do not deleteconsole.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