0.2.4 • Published 1 year ago

unplugin-keep-polite v0.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

unplugin-keep-polite

Warning you impolite words in the development console for Vite, Webpack, and Rollup

Install

npm i unplugin-keep-polite --save-dev

Usage

import unPluginPolite from 'unplugin-keep-polite'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    // ...
    unPluginPolite.vite(),
  ],
  // ...
})
import unPluginPolite from 'unplugin-keep-polite'

export default {
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'bundle.js',
  },
  plugins: [unPlugin.webpack()],
}
import { defineConfig } from 'rollup'
import unPluginPolite from 'unplugin-keep-polite'

export default defineConfig({
  input: 'src/index.ts',
  output: {
    file: 'dist/bundle.js',
    format: 'cjs',
  },
  plugins: [
    unPluginPolite.rollup(),
  ],
})

Options

autoReplace

  • Auto-replace impolite words
  • Type: Boolean
  • Default: false

replacer

  • Replace impolite words
  • Type: String
  • Default: true

customDict

  • Custom dictionary for impolite words
  • Type: String[] | { path: string }
  • Default: undefined
  • Example: { path: 'dict.json' }

extraDict

  • Add extra dictionary for impolite words
  • Type: String[]
  • Default: []
  • Example: []
0.2.4

1 year ago

0.2.2

2 years ago

0.1.0

2 years ago

0.2.1

2 years ago

0.1.1

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago