@wxa/plugin-replace

replace string

Usage no npm install needed!

<script type="module">
  import wxaPluginReplace from 'https://cdn.skypack.dev/@wxa/plugin-replace';
</script>

README

:blush::blush::blush::blush:Documentation

wxa-plugin-replace

NPM version

:tada:replace string in wxa

Usage

add replace target

    new ReplacePlugin({
      list: [{
        regular: new RegExp('APP_ENV', 'gm'),
        value: 'bcds'
      }]
    })

object configs

    new ReplacePlugin({
      list: {
        'APP_ENV': 'bcds'
      }
    })

Configurations

  • list

    • type: {Object, Array} list
    • default: []
    • tip: an array or object to replace in wxa project
  • flag

    • type: {String} flag
    • flag: gm
    • tip: regular express's flag.