rollup-plugin-re icon indicating copy to clipboard operation
rollup-plugin-re copied to clipboard

rollup replace plugin

Results 10 rollup-plugin-re issues
Sort by recently updated
recently updated
newest added

Added the ability to use the plugin as a rollup output plugin in generateBundle hook. Hook option forwarding is in place and could further allow #11 resolution if needed. At...

Small pull request adding typing support in order to better fit TypeScript environments. Descriptions are based on documentation and can be tweaked where needed.

Or even report more detailed match result at build end. Currently it is hard to tell if a pattern doesn't work anymore after source code/dependencies updates.

I see the example in readme only have `#if` `#endif`, so does pre-processor support `#else` `#elseif` or `#not` directive?

Currently, this plugin only work at `transform` hook so there is no way to replace the code generated in `renderChunk` hook. I think we can make it also run at...

I understood better how the `patterns` option works only after reading the issue #1 (I used `match` and `replace` options without `test` and didn't understand why it was not working)....

```js { //... watch: { input: [ // ... './src/fileToInject.txt', ], }, plugins: [ // ... replace({ replaces: { __PLACEHOLDER__: (data) => { return fs.readFileSync('./src/fileToInject.txt', 'utf-8') }, } }) ],...

When test is a Regex and the pattern.replace is a function, the match array is passed to pattern.replace When test is a string, the file id is passed to pattern.replace...

Hi Jetiny, According to the documentation, given the below options: ```javascript { defines: { IS_SKIP: false, IS_REMOVE: true, } } ``` The below input should produce the below output: ###...

The error is threw when two patterns overlap each others. input: ```js export default "hello 123 hello"; ``` config: ```js import re from 'rollup-plugin-re'; export default { input: 'test.js', format:...