0.0.3 • Published 10 months ago

@gyhyfj/rollup-plugin-replace v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

rollup-plugin-replace

Code for leaning, based on @rollup/plugin-replace. Both support for rollup and vite.

Get Start

  1. Install:
pnpm add @gyhyfj/rollup-plugin-replace -D
  1. Usage:
plugins: [
  replacePlugin({
    // [RegExp|string, string][]
    replace: [
      ['book', 'cat'],
      [/!((?<=(\<|\<\/))template(?=\>))/i, 'cat'],
    ],
    // [RegExp|string]
    include: ['**/*.(vue|tsx|jsx|ts|js)'],
    exclude: ['node_modules/**'],
  }),
],

Different from @rollup/plugin-replace, *.ext will match *.ext files at root path of project, which @rollup/plugin-replace won't.

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago