code: function regexReplaceLoader(source) {
    var options = getOptions(this)
  
    var stages = Array.isArray(options.stages)
      ? options.stages
      : [options]
  
    var result = source
  
    stages.forEach(function (stage) {
      var regex = getRegex(stage.regex, stage.flags)
      result = replace(regex, result, stage)
    })
  
    return 'module.exports = ' + JSON.stringify(result)
  }
docs: @typedef {Object} LoaderOptions
  @property {string|RegExp} regex
  @property {string} [flags]
  @property {string|((match: RegExpExecArray) => string)} value
  @property {LoaderOptions[]} [stages]
   
  The Regex Replace Loader.
  
  Replace values from the source via a regular expression.
  
  @param {string} source
  @returns {string}