string replace plugin for webpack
Usage example
var StringReplacePlugin = ;moduleexports =module:loaders:// configure replacements for file patternstest: /index.html$/loader: StringReplacePluginplugins:// an instance of the plugin must be present
This allows for arbitrary strings to be replaced as part of the module build process. The original intent is to replace API keys in modules prior to deployment.
API
StringReplacePlugin
nextLoaders
loaders to follow the replacementoptions
replacements
disables the pluginpattern
a regex to match against the file contentsreplacement
an ECMAScript string replacement function
prevLoaders
loaders to apply prior to the replacement
License
MIT (http://www.opensource.org/licenses/mit-license.php)