replace-task-webpack-plugin

1.0.1 • Public • Published

replace-task-webpack-plugin

A gulp-replace-task port to webpack

Usage

To replace all @@foo to bar, and replace all /baz/ to bazbaz.

// webpack.config.js
module.exports = {
  // ... other configs
  plugins: [
    new ReplaceTaskWebpackPlugin({
      patterns: [
        {
          match: 'foo',
          replacement: 'bar'
        },
        {
          match: /baz/g,
          replacement: function(){
            return 'bazbaz';
          }
        }
      ]
    })
  ]
};

Also see

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i replace-task-webpack-plugin

Weekly Downloads

8

Version

1.0.1

License

MIT

Last publish

Collaborators

  • treri