1.0.0 • Published 7 years ago

webpack-string-replacer-plugin v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

webpack-string-replacer-plugin

A plugin for replacing string value in assets. It processes assets right before emitting so you can treat this plugin as a postprocessor.

Installation

npm install --save-dev webpack-string-replacer-plugin

Usage

const StringReplacerPlugin = require('webpack-string-replacer-plugin');

...

// add to webpack plugins array
plugins: [
  new StringReplacerPlugin(options)
]

/*
  options: {
    assets: array of assets names to update, by default all the assets will be updated
    replaceValue: regex or string to replace, this option is mandatory
    newValue: new value to insert or function, by default is ''
  }

*/

PS. Under the hood it uses String.prototype.replace() method with replaceValue and newValue as parameters.

1.0.0

7 years ago

1.0.0-beta-7

7 years ago

1.0.0-beta-6

7 years ago

1.0.0-beta-5

7 years ago

1.0.0-beta-3

7 years ago

1.0.0-beta-2

7 years ago

1.0.0-beta-1

7 years ago