replace(name, decl, ruleOptions) {
    const oldRule = this.get(name)
    const oldIndex = this.index.indexOf(oldRule)
    if (oldRule) {
      this.remove(oldRule)
    }
    let options = ruleOptions
    if (oldIndex !== -1) options = {...ruleOptions, index: oldIndex}
    return this.add(name, decl, options)
  }
Replace rule.
Create a new rule and remove old one instead of overwriting
because we want to invoke onCreateRule hook to make plugins work.