0.0.3 • Published 2 years ago
@gyhyfj/rollup-plugin-replace v0.0.3
rollup-plugin-replace
Code for leaning, based on @rollup/plugin-replace.
Both support for rollup and vite.
Get Start
- Install:
pnpm add @gyhyfj/rollup-plugin-replace -D- 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.