string-replace-loader
JSON →A Webpack loader that performs string or regex replacements on file contents during the build process. Version 3.3.0 is the latest stable release, with occasional minor/patch updates. It supports plain string replacement, RegExp replacement (via string with flags or RegExp object), multiple replacements in a single rule, callback-based dynamic replacement, and strict mode. Key differentiators: flexible configuration similar to String.prototype.replace, array of replacements, strict mode to ensure replacements occurred. Compared to alternatives like `replace-in-file-webpack-plugin` or `webpack-replace-loader`, this loader integrates directly into the loader chain and works per-file based on test patterns. Requires Webpack 5+ and Node.js 4+.
Traffic · last 30 days ↓75% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇬🇧 United Kingdom · 🇩🇪 Germany