lukeed / lukeed/webpack-plugin-replace
Replacing is wrong if values or regexps contain $ character.
- Dominant language
- JavaScript
- Stars
- 36
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
I tried to use the plugin for replacing $$TEST$$ string in the code. The plugin didn't change anything.
Config example:
```
const ReplacePlugin = require('webpack-plugin-replace');
module.exports = {
// ...
plugins: [
new ReplacePlugin({
exclude: [
'foo.js',
/node_modules/,
filepath => filepath.includes('ignore')
],
values: {
'$$TEST$$': 'FOO',
}
})
]
};
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported configuration with a replacement key containing `$$TEST$$`, then inspect the plugin's replacement handling and any existing tests. Done means values or regular expressions containing `$` are replaced correctly without changing behavior for ordinary values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100