2.1.0 • Published 5 years ago

@kwzm/replace-loader v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

replace-loader

A loader to replace text in webpack, since the internal implementation is based on the string.prototype.replace implementation, the methods used are basically the same.

Install

npm i @kwzm/replace-loader

Usage

{
  loader: '@kwzm/replace-loader',
    options: {
      replace: [
        { from: 'old text', to: 'new text' },
        { from: /old text/gi, to: 'new text'}
      ]
    }
}

Licence

MIT